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?
Thanks again,
Jeff
--
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.