Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Unindent attributes iteration in scaffold index template

Otherwise we get extra indent for the <td> elements due to the extra
spaces at the beginning of the lines, like this:

          <td><%= %></td>
          <td><%= link_to 'Show', author %></td>
        <td><%= link_to 'Edit', edit_author_path(author) %></td>
  • Loading branch information...
commit e62f4404cf35e1606def6853b4450068f0ebc2cb 1 parent 4746f92
Carlos Antonio da Silva carlosantoniodasilva authored
4 railties/lib/rails/generators/erb/scaffold/templates/index.html.erb
@@ -15,9 +15,9 @@
<%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
- <% attributes.reject(&:password_digest?).each do |attribute| -%>
+<% attributes.reject(&:password_digest?).each do |attribute| -%>
<td><%%= <%= singular_table_name %>.<%= %> %></td>
- <% end -%>
+<% 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>
Please sign in to comment.
Something went wrong with that request. Please try again.