aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/erb/scaffold
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/generators/erb/scaffold')
-rw-r--r--railties/lib/rails/generators/erb/scaffold/templates/_form.html.erb2
-rw-r--r--railties/lib/rails/generators/erb/scaffold/templates/index.html.erb4
-rw-r--r--railties/lib/rails/generators/erb/scaffold/templates/show.html.erb2
3 files changed, 4 insertions, 4 deletions
diff --git a/railties/lib/rails/generators/erb/scaffold/templates/_form.html.erb b/railties/lib/rails/generators/erb/scaffold/templates/_form.html.erb
index d12b2ff0e5..32546936e3 100644
--- a/railties/lib/rails/generators/erb/scaffold/templates/_form.html.erb
+++ b/railties/lib/rails/generators/erb/scaffold/templates/_form.html.erb
@@ -11,7 +11,7 @@
</div>
<%% end %>
-<% for attribute in attributes -%>
+<% attributes.each do |attribute| -%>
<div class="field">
<%%= f.label :<%= attribute.name %> %><br />
<%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>
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>
diff --git a/railties/lib/rails/generators/erb/scaffold/templates/show.html.erb b/railties/lib/rails/generators/erb/scaffold/templates/show.html.erb
index c0e5ccff1e..67f263efbb 100644
--- a/railties/lib/rails/generators/erb/scaffold/templates/show.html.erb
+++ b/railties/lib/rails/generators/erb/scaffold/templates/show.html.erb
@@ -1,6 +1,6 @@
<p id="notice"><%%= notice %></p>
-<% for attribute in attributes -%>
+<% attributes.each do |attribute| -%>
<p>
<b><%= attribute.human_name %>:</b>
<%%= @<%= singular_table_name %>.<%= attribute.name %> %>