On Jueves, 5 de Mayo de 2011 05:16:47 Bernardo escribió:
> Hi.
> 
> I have a has_and_belongs_to_many relationship between two models. When
> I use active scaffold to create one of the two models, I use form_ui
> =  : select , which gives me a series of checkboxes that in turn,
> populate the join table.
> 
> My question is: can I filter those checkboxes to a smaller set using
> some additional criteria (e.g sql query)? I read about
> http://rdoc.info/github/activescaffold/active_scaffold/master/ActiveScaffol
> d/Helpers/AssociationHelpers, but when I use
> "options_for_association_conditions", it complains that my sql query
> returns more than one row (which makes sense, because its exactly what I
> need). It seems its made only for single associations, to filter a combo
> box set of results.
> 
> I tried something like: http://www.pastie.org/1866627

Please, send the log with sql query and error

> 
> I used conditions_for_collection too, in a similar way.
> 
> Any help will be greatly appreciated, thanks in advance.

-- 
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