Skip to content

Instantly share code, notes, and snippets.

@jagmitg
Created April 30, 2012 03:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jagmitg/2555260 to your computer and use it in GitHub Desktop.
Save jagmitg/2555260 to your computer and use it in GitHub Desktop.
undefined local variable or method `shows' for #<#<Class:0x007f8f62ca7828>:0x007f8f62ca3b10>
Extracted source (around line #10):
7:
8: <li><%= show.day %></li>
9:
10: <% shows.group_by(&:day).each do |day, shows| %>
11: <p><%= day %></p>
12: <ul style="width:320px;">
13: <% shows.each_with_index do |show, i| %>
<h1>Listing shows</h1>
<ul>
<% @shows.each do |show| %>
<li><%= show.screening.film.title %> @ <%= show.screening.cinema.name %></li>
<li><%= show.day %></li>
<% shows.group_by(&:day).each do |day, shows| %>
<p><%= day %></p>
<ul style="width:320px;">
<% shows.each_with_index do |show, i| %>
<li style="display: inline-block;">
<%= ?| if i > 0 %>
<%= link_to show.showed_at, show %>
</li>
<% end %>
</ul>
<% end %>
<% end %>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment