Rex,

You could set @lists and @list in the new action (they are separate 
vars), even though you stated you couldn't.  However, if I understand 
what you're trying to achieve (assign @lists for all views) then a 
before filter is fine.  You can place it in a specific controller or the 
application controller (so it's available for all pages in your app, as 
it sounds like it's used in Navigation).

You should think about caching, so you're not hitting the DB each time 
an action is called.  There are caching schemes out there to look into.

before_filter :nav_show_lists

 def nav_show_lists
   @nav_lists = List.all
 end


Brian

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to