diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-04-18 16:01:31 -0300 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-04-18 16:01:38 -0300 |
commit | e62f4404cf35e1606def6853b4450068f0ebc2cb (patch) | |
tree | a034f83cd0a529e0926b860c4facaf59333b7466 /railties | |
parent | 4746f92b137ed22189cd98247d29773807a40a87 (diff) | |
download | rails-e62f4404cf35e1606def6853b4450068f0ebc2cb.tar.gz rails-e62f4404cf35e1606def6853b4450068f0ebc2cb.tar.bz2 rails-e62f4404cf35e1606def6853b4450068f0ebc2cb.zip |
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:
<tr>
<td><%= author.name %></td>
<td><%= link_to 'Show', author %></td>
<td><%= link_to 'Edit', edit_author_path(author) %></td>
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/generators/erb/scaffold/templates/index.html.erb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/erb/scaffold/templates/index.html.erb b/railties/lib/rails/generators/erb/scaffold/templates/index.html.erb index 1606b860dc..9d778642f2 100644 --- a/railties/lib/rails/generators/erb/scaffold/templates/index.html.erb +++ b/railties/lib/rails/generators/erb/scaffold/templates/index.html.erb @@ -15,9 +15,9 @@ <tbody> <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %> <tr> - <% attributes.reject(&:password_digest?).each do |attribute| -%> +<% attributes.reject(&:password_digest?).each do |attribute| -%> <td><%%= <%= singular_table_name %>.<%= attribute.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> |