aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/erb/scaffold/templates/index.html.erb
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2011-05-18 20:36:25 +0900
committerAkira Matsuda <ronnie@dio.jp>2011-05-18 21:08:08 +0900
commit22ed6cb798b476f63e5d5b84cb28e054c4f1870e (patch)
tree645408575753b975ddb1bae5821c14d898a80a09 /railties/lib/rails/generators/erb/scaffold/templates/index.html.erb
parent9d8e2fb5e21da725755366ae2b7affe83ce1b6b0 (diff)
downloadrails-22ed6cb798b476f63e5d5b84cb28e054c4f1870e.tar.gz
rails-22ed6cb798b476f63e5d5b84cb28e054c4f1870e.tar.bz2
rails-22ed6cb798b476f63e5d5b84cb28e054c4f1870e.zip
for ... in => .each
I believe this is more modern way
Diffstat (limited to 'railties/lib/rails/generators/erb/scaffold/templates/index.html.erb')
-rw-r--r--railties/lib/rails/generators/erb/scaffold/templates/index.html.erb4
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 a7393cfe18..7b1a2a1841 100644
--- a/railties/lib/rails/generators/erb/scaffold/templates/index.html.erb
+++ b/railties/lib/rails/generators/erb/scaffold/templates/index.html.erb
@@ -2,7 +2,7 @@
<table>
<tr>
-<% for attribute in attributes -%>
+<% attributes.each do |attribute| -%>
<th><%= attribute.human_name %></th>
<% end -%>
<th></th>
@@ -12,7 +12,7 @@
<%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
<tr>
-<% for attribute in attributes -%>
+<% attributes.each do |attribute| -%>
<td><%%= <%= singular_table_name %>.<%= attribute.name %> %></td>
<% end -%>
<td><%%= link_to 'Show', <%= singular_table_name %> %></td>