Sha256: 10486fcc88a0aa660eccfbe6fcc2c251e246fb4e7a56377e283f22508bc7a6e5

Contents?: true

Size: 923 Bytes

Versions: 12

Compression:

Stored size: 923 Bytes

Contents

<h1>Listing <%= @name_plural_camel %></h1>

<table>
  <tr>
<% 
unless columns.empty? 
  columns.each do |col|
-%>
    <th><%= col.column_name.camelcase %></th>
<% 
  end
else
-%>
    <th>&nbsp;</th>
<% 
end
-%>
  </tr>

<%% for <%= @name_singular %> in @<%= @name_plural %> %>
  <tr>
<%
unless columns.empty? 
  columns.each do |col| -%>
    <td><%%= <%= @name_singular %>.<%= col.column_name %> %></td>
<%
  end
else
-%>
    <td>&nbsp;</td>
<% end -%>
    <td><%%= link_to("Show", <%= @name_plural %>_show_url(:id => <%= @name_singular %>.id)) %></td>
    <td><%%= link_to("Edit", <%= @name_plural %>_edit_url(:id => <%= @name_singular %>.id)) %></td>
    <td><%%= link_to("Delete", <%= @name_plural %>_delete_url(:id => <%= @name_singular %>.id), :method => :delete, :confirm => "Are you sure?") %></td>
  </tr>
<%% end %>
</table>

<br />

<%%= link_to("New <%= @name_singular_camel %>", <%= @name_plural %>_new_url) %>

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
mack-0.4.6 lib/generators/scaffold_generator/templates/generic/app/views/index.html.erb.template
mack-0.4.7 lib/generators/scaffold_generator/templates/generic/app/views/index.html.erb.template
mack-active_record-0.5.1 lib/scaffold_generator/templates/app/views/index.html.erb.template
mack-active_record-0.6.0 lib/scaffold_generator/templates/app/views/index.html.erb.template
mack-active_record-0.6.0.1 lib/scaffold_generator/templates/app/views/index.html.erb.template
mack-active_record-0.6.1.1 lib/mack-active_record/scaffold_generator/templates/app/views/index.html.erb.template
mack-active_record-0.5.5 lib/scaffold_generator/templates/app/views/index.html.erb.template
mack-active_record-0.5.0 lib/scaffold_generator/templates/app/views/index.html.erb.template
mack-active_record-0.6.1.2 lib/mack-active_record/scaffold_generator/templates/app/views/index.html.erb.template
mack-active_record-0.6.1 lib/mack-active_record/scaffold_generator/templates/app/views/index.html.erb.template
mack-data_mapper-0.5.1 lib/scaffold_generator/templates/app/views/index.html.erb.template
mack-data_mapper-0.5.0 lib/scaffold_generator/templates/app/views/index.html.erb.template