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