Skip to content

Instantly share code, notes, and snippets.

@besquared
Created September 10, 2008 19:00
Show Gist options
  • Select an option

  • Save besquared/10012 to your computer and use it in GitHub Desktop.

Select an option

Save besquared/10012 to your computer and use it in GitHub Desktop.
ActionView::TemplateError (You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.include?) on line #1 of news/_battled.html.erb:
1: <% collapse_battles(battle, consumer) do |collection| %>
2: <% if consumer == collection.last.winner || (consumer.is_a?(User) && collection.last.winner_ids.include?(consumer.id)) %>
3: <%= render :partial => 'news/won_battle', :locals => {:collection => collection, :useyou => useyou, :consumer => consumer} %>
4: <% else %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment