I have an app
that does a number of collection_selects. There are two general
methods of getting the data and displaying it that I am aware of. You can do a find in the controller and assign the result to an instance variable and do the collection_select stuff in the view. Alternatively you can put the whole find and collection_select in the view (in erb of course). To me it seems to clutter up the view to do the find in the view so I prefer it in the controller. Is there some reason that it would be better to do it all in the view? I am looking for opinions here on the 'best practice' or does it not matter? Thanks Norm -- 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. |
- [Rails] find in controller or view Norm Scherer
- [Rails] Re: find in controller or view Ar Chron
- [Rails] Re: find in controller or view Marnen Laibow-Koser
- [Rails] Re: find in controller or view chewmanfoo
- [Rails] Re: find in controller or vie... Marnen Laibow-Koser