Nice it works like a charm :)

thx for your help

On 30 sep, 12:01, "Sergio Cambra .:: entreCables S.L. ::."
<[email protected]> wrote:
> On Martes, 29 de Septiembre de 2009 16:16:38 iUser59 escribió:
>
>
>
>
>
> > HelloWorld,
>
> > I need your help to make possible to create a nested link which
> > display only some items and onClick, display this same items.
>
> > That's not very clear so maybe on example should be great.
>
> > I have a toto1 and toto2 models
>
> > ##
> > class Toto1 < ActiveRecord::Base
> > has_and_belongs_to_many :toto2s
> > end
>
> > class Toto2 < ActiveRecord::Base
> > has_and_belongs_to_many :toto1s
> > end
>
> > ##
> > in my database, I have a field "customField" in the toto2s table
>
> > I have toto1 and toto2 managed by active_scaffold.
>
> > I would like to customize the toto2 column in toto1 to show all the
> > toto2 items linked to toto1 **AND** which have customField set to true
> > (Helper do this) and on click, show only this items in the sub
> > scaffold which appear.
>
> > How can I make it possible please?
>
> Add another association in Toto1 with the conditions, and use it in
> active_scaffold controller instead of toto2s:
> has_and_belongs_to_many :filtered_toto2s, :class_name => 'Toto2', :conditions
> => {:customField => true}
>
> --
> Sergio Cambra .:: entreCables S.L. ::.
> Mariana Pineda 23, 50.018 Zaragoza
> T) 902 021 404 F) 976 52 98 07 E) [email protected]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to