Skip to content

Commit

Permalink
Needless fancy structure that did not anything
Browse files Browse the repository at this point in the history
  • Loading branch information
dhh committed Jan 5, 2013
1 parent 89979ca commit 516f148
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -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>
Expand Down

2 comments on commit 516f148

@rafaelfranca
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@dhh
Copy link
Member Author

@dhh dhh commented on 516f148 Jan 5, 2013 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.