in application controller @upcomingevents = Event.all
in application layout <% @upcomingevents.each do |upcomingevent| %> <%= upcomingevent.name %> <% end %> there are events.. but i get an error of ActionView::TemplateError (undefined method `each' for nil:NilClass) on line #77 of app/views/layouts/application.html.erb: 74: <%= content_tag :p, msg, :class => key, :id => key -%> 75: <% end -%> 76: 77: <% @upcomingevents.each do |upcomingevent| %> 78: <%= upcomingevent %> 79: <% end %> 80: <div id="content" class="content"> --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

