search for: the_map

Displaying 1 result from an estimated 1 matches for "the_map".

Did you mean: the_dag
2006 Mar 16
4
calling an actionview method from inside a model
Hi, I would like my model instance to produce it''s own list of options for a form select. This is from a product model that has_many variations def alts_for_select(current_id) the_map = variations.map{|v| [v.name, v.id]} options_for_select(the_map, current_id) end the model cannot see the options_for_select method I tried to use ActionView::Helpers::FormOptionsHelper::options_for_select(the_map, current_id) but this didn''t work. Any ideas? Thanks, Peter