Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Needless fancy structure that did not anything

  • Loading branch information...
commit 516f148450e733371a69cb966c632b1b64c41f49 1 parent 89979ca
@dhh dhh authored
View
4 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

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

@dhh
Owner
Please sign in to comment.
Something went wrong with that request. Please try again.