If you have a side table on your page with info from the database, and you want it to appear on several pages in your RoR app. How should this be done?
Let’s say you output this data in a view, called LeftTableView or something like that.
Now in the, “/products/” view you want to display this data, and you also want to display it on “/products/12” and also on “/friends/” and so on.
How do you render out this “partial” view and bind the database data using the original controller only? Or… is it “better” to collect the data again from each controller?
Assumed, if you want appear “category” on navigation from database, keep in application_controller.rb
on products_controller.rb and friends_controller.rb , you just call navcategory with before_filter
and on layout