Hi. I''m creating menu items on a webpage. For the sake of cleaner code I''d like to create menu items in controller and just iterate through in my rthml. So, in modules I have created class Menu def items review = MenuItem.new(stringReview, "main", true) edit = MenuItem.new(stringEditQuestions, "logoff", false) logoff = MenuItem.new(stringLogoff, "logoff", false) @items = [ review, edit, logoff ] end end and in rhtml <ul> <% @menuitems.each do |item| %> <li class="selected"><%= item.name, :action => item.action %></li> <% end %> </ul> But I''m receiving "undefined method `items'' for Menu:Class" What is incorrect? Or is there any better "ruby way"?? Thanks a lot!! Andrew -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---