1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Needless fancy structure that did not anything

This commit is contained in:
David Heinemeier Hansson 2013-01-05 19:06:48 +01:00
parent 89979ca8ff
commit 516f148450

View file

@ -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>