I currently have an activerecord object that I make available to all my controllers through a variable called @menu that I set in application.rb. @menu has a one to many association with it's children (MenuItems). @menu has a virtual attribute that I set to let it know which menu_item is currently selected. I made it virtual just because I don't want the selection to be saved to the database. The problem I'm having is that in some parts of my application I have a reference to one of the child objects which use to get a reference to the parent object (@menu) which, it appears, re-queries the database giving me a reference to the saved @menu rather than the one that has the virtual attribute set on it. How can I get around this? Thanks in advance for any advice you can offer me. -Mike
ok cool. i think this is over my head for now. thanks for your help. i ended up doing something like what you suggested.