All pastes #827032 Raw Edit

Unnamed

public text v1 · immutable
#827032 ·published 2007-12-21 15:49 UTC
rendered paste body
<pre><%= @extensions.inspect %></pre>
<% @extensions.each do |e| %>
 <tr bgcolor="#ffffff">
  <td><%= e.context %></td>
  <td><%= e.exten %></td>
  <td><%= e.priority %></td>
  <td><%= e.app %></td>
  <td><%= e.appdata %></td>
 </tr>
<% end %>

# Above is in the view

  def list
    @extensions = Extension.order(:context, :exten, :priority)
    render
  end

# Above is in the controller

The result is an empty table, and "nil" showing on the @extensions.inspect line in the view. But if I create a script to do the same as my list does, but dump to a file, it outputs fine.