Elias Orozco wrote:
> Hey Justin,
>
> I'll recommend that every data used to load drop down lists on the
> views should be loaded on the views, that avoids repetition on the
> controllers. For example a list of post categories you can load it
> like this:
>
> <%= collection_select(:post, :post_category_id,
> PostCategory.find(:all), :id, :name, {}) %>
>
> Hope it helps,
>
> El�as
That's a good suggestion, Elias. I'll add that, if the drop-down list is
going to be in multiple views, I'd put it in a helper method.
-Nick
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" 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/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---