I am trying to implement dynamic database-driven menu on my web
application. Menu is just a set of links to controller actions, but
each user has different set of menu items based on their privileges.
Menu items (labels and URLs) are stored in database as ActiveRecord
object called Menu.
The only problem is whenever browser is refreshed, it runs query to
pull out menu items. This would be performance overhead. Menu items
are not changed that often, so I am thinking it is better to put this
kind of information to session variable.
I would like to know if this approach is a good direction. If so, in
what format should I store menu item information, e.g., string, hash,
or activerecord object?
Thanks in advance.