lib/action_dispatch/templates/rescues/_source.erb in web-console-2.0.0.beta4 vs lib/action_dispatch/templates/rescues/_source.erb in web-console-2.0.0

- old
+ new

@@ -1,27 +1,29 @@ -<% if @extract_sources %> - <% @extract_sources.each_with_index do |extract_source, index| %> - <div class="source <%="hidden" if index != 0%>" id="frame-source-<%=index%>"> - <div class="info"> - Extracted source (around line <strong>#<%= extract_source[:line_number] %></strong>): - </div> - <div class="data"> - <table cellpadding="0" cellspacing="0" class="lines"> +<% if @source_extract %> + <% @source_extract.each_with_index do |extract_source, index| %> + <% if extract_source[:code] %> + <div class="source <%="hidden" if @show_source_idx != index%>" id="frame-source-<%=index%>"> + <div class="info"> + Extracted source (around line <strong>#<%= extract_source[:line_number] %></strong>): + </div> + <div class="data"> + <table cellpadding="0" cellspacing="0" class="lines"> <tr> <td> <pre class="line_numbers"> - <% extract_source[:code].keys.each do |line_number| %> + <% extract_source[:code].each_key do |line_number| %> <span><%= line_number -%></span> <% end %> </pre> </td> <td width="100%"> <pre> <% extract_source[:code].each do |line, source| -%><div class="line<%= " active" if line == extract_source[:line_number] -%>"><%= source -%></div><% end -%> </pre> </td> </tr> - </table> + </table> + </div> </div> - </div> + <% end %> <% end %> <% end %>