If you have a layout that has in a menu which gets its menu items from a database. Where is the recommended place in a Rails application to place that call and assigns it to the instance variable that the layout uses?
1. @menuitems # exists in application.html.erb
2. @menuitems = MenuItem.find(:all) # code exists somewhere (where should this exist?)
@womble - Yes a before_filter would be helpful, but I would have to include it in all controllers using this layout, or is this something I can put in the application_controller.rb, would the child controllers and accompanying views be able to see that instance variable?