From 516f148450e733371a69cb966c632b1b64c41f49 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 5 Jan 2013 19:06:48 +0100 Subject: Needless fancy structure that did not anything --- railties/lib/rails/generators/erb/scaffold/templates/index.html.erb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 805d71221f..90d8db1df5 100644 --- a/railties/lib/rails/generators/erb/scaffold/templates/index.html.erb +++ b/railties/lib/rails/generators/erb/scaffold/templates/index.html.erb @@ -13,13 +13,15 @@ - <%%= content_tag_for(:tr, @<%= plural_table_name %>) do |<%= singular_table_name %>| %> + <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %> + <% attributes.each do |attribute| -%> <%%= <%= singular_table_name %>.<%= attribute.name %> %> <% 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?' } %> + <%% end %> -- cgit v1.2.3