From e62f4404cf35e1606def6853b4450068f0ebc2cb Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Thu, 18 Apr 2013 16:01:31 -0300 Subject: Unindent attributes iteration in scaffold index template Otherwise we get extra indent for the elements due to the extra spaces at the beginning of the lines, like this: <%= author.name %> <%= link_to 'Show', author %> <%= link_to 'Edit', edit_author_path(author) %> --- railties/lib/rails/generators/erb/scaffold/templates/index.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'railties/lib/rails/generators/erb/scaffold/templates/index.html.erb') 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 @@ <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %> - <% attributes.reject(&:password_digest?).each do |attribute| -%> +<% attributes.reject(&:password_digest?).each do |attribute| -%> <%%= <%= singular_table_name %>.<%= attribute.name %> %> - <% end -%> +<% end -%> <%%= link_to 'Show', <%= singular_table_name %> %> <%%= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>) %> <%%= link_to 'Destroy', <%= singular_table_name %>, method: :delete, data: { confirm: 'Are you sure?' } %> -- cgit v1.2.3