Permalink
Browse files

Needless fancy structure that did not anything

  • Loading branch information...
dhh committed Jan 5, 2013
1 parent 89979ca commit 516f148450e733371a69cb966c632b1b64c41f49
Showing with 3 additions and 1 deletion.
  1. +3 −1 railties/lib/rails/generators/erb/scaffold/templates/index.html.erb
@@ -13,13 +13,15 @@
</thead>
<tbody>
- <%%= content_tag_for(:tr, @<%= plural_table_name %>) do |<%= singular_table_name %>| %>
+ <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
+ <tr>
<% attributes.each do |attribute| -%>
<td><%%= <%= singular_table_name %>.<%= attribute.name %> %></td>
<% end -%>
<td><%%= link_to 'Show', <%= singular_table_name %> %></td>
<td><%%= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>) %></td>
<td><%%= link_to 'Destroy', <%= singular_table_name %>, method: :delete, data: { confirm: 'Are you sure?' } %></td>
+ </tr>
<%% end %>
</tbody>
</table>

2 comments on commit 516f148

@rafaelfranca

This comment has been minimized.

Show comment
Hide comment
@rafaelfranca

rafaelfranca Jan 5, 2013

Member

Why? This helper add class and id for the table lines.

Member

rafaelfranca replied Jan 5, 2013

Why? This helper add class and id for the table lines.

@dhh

This comment has been minimized.

Show comment
Hide comment
@dhh

dhh Jan 5, 2013

Member
Member

dhh replied Jan 5, 2013

Please sign in to comment.