From dee375a9dfc1fd20795431a1a410131d844820a8 Mon Sep 17 00:00:00 2001 From: twinturbo Date: Sun, 29 Apr 2012 12:48:20 -0700 Subject: [PATCH] Close #3886 - Add THEAD and TBODY to scaffold markup --- .../erb/scaffold/templates/index.html.erb | 36 ++++++++++--------- 1 file changed, 20 insertions(+), 16 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 303331a4f0..d78d97b2b4 100644 --- a/railties/lib/rails/generators/erb/scaffold/templates/index.html.erb +++ b/railties/lib/rails/generators/erb/scaffold/templates/index.html.erb @@ -1,23 +1,27 @@

Listing <%= plural_table_name %>

- -<% attributes.each do |attribute| -%> - -<% end -%> - - - - + + + <% attributes.each do |attribute| -%> + + <% end -%> + + + + + - <%%= content_tag_for(:tr, @<%= plural_table_name %>) do |<%= singular_table_name %>| %> -<% attributes.each do |attribute| -%> - -<% end -%> - - - - <%% end %> + + <%%= content_tag_for(:tr, @<%= plural_table_name %>) do |<%= singular_table_name %>| %> + <% attributes.each do |attribute| -%> + + <% end -%> + + + + <%% end %> +
<%= attribute.human_name %>
<%= attribute.human_name %>
<%%= <%= singular_table_name %>.<%= attribute.name %> %><%%= link_to 'Show', <%= singular_table_name %> %><%%= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>) %><%%= link_to 'Destroy', <%= singular_table_name %>, confirm: 'Are you sure?', method: :delete %>
<%%= <%= singular_table_name %>.<%= attribute.name %> %><%%= link_to 'Show', <%= singular_table_name %> %><%%= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>) %><%%= link_to 'Destroy', <%= singular_table_name %>, confirm: 'Are you sure?', method: :delete %>

-- GitLab