On Lunes, 17 de Mayo de 2010 03:22:48 JeffS escribió: > Okay, after inspecting the :record_select plugin a little, I see that > I need to define record_select_conditions_from_controller. I want to > remove all companies with a "tier" value of zero. > > Here is my options_for_association, which is in a controller helper: > > def options_for_association_conditions(association) > if association.name == :company > ['companies.tier != ?', 0] > else > super > end > end > > I think I need to put something like this into the CompaniesHelper: > > module CompaniesHelper > def record_select_conditions_from_controller > ['company.tier != ?', 0] > end > end > > but, that doesn't quite work. Anyone have experience with this? >
Put that method in the same controller where you use record_select -- 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.
