diff options
author | Mike Gunderloy <MikeG1@larkfarm.com> | 2009-02-01 10:41:57 -0600 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2009-02-05 20:27:48 +0100 |
commit | 44f02de2ad6d22d0d781c0c7303bcd8162aaa5d6 (patch) | |
tree | aed8b744c3b370fed81a6a646693793fba7d85af /railties/lib/rails_generator/generators/components/scaffold/templates | |
parent | 46288f5935b03b48b2593c52f947dc4c5c505b90 (diff) | |
download | rails-44f02de2ad6d22d0d781c0c7303bcd8162aaa5d6.tar.gz rails-44f02de2ad6d22d0d781c0c7303bcd8162aaa5d6.tar.bz2 rails-44f02de2ad6d22d0d781c0c7303bcd8162aaa5d6.zip |
Update scaffolding [#1840 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
Diffstat (limited to 'railties/lib/rails_generator/generators/components/scaffold/templates')
-rw-r--r-- | railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/components/scaffold/templates/view_index.html.erb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb b/railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb index cbfd88f3bd..4d190b9362 100644 --- a/railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb +++ b/railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb @@ -2,7 +2,7 @@ class <%= controller_class_name %>Controller < ApplicationController # GET /<%= table_name %> # GET /<%= table_name %>.xml def index - @<%= table_name %> = <%= class_name %>.find(:all) + @<%= table_name %> = <%= class_name %>.all respond_to do |format| format.html # index.html.erb diff --git a/railties/lib/rails_generator/generators/components/scaffold/templates/view_index.html.erb b/railties/lib/rails_generator/generators/components/scaffold/templates/view_index.html.erb index e89757e3e9..f51fe85dc9 100644 --- a/railties/lib/rails_generator/generators/components/scaffold/templates/view_index.html.erb +++ b/railties/lib/rails_generator/generators/components/scaffold/templates/view_index.html.erb @@ -7,7 +7,7 @@ <% end -%> </tr> -<%% for <%= singular_name %> in @<%= plural_name %> %> +<%% @<%= plural_name %>.each do |<%= singular_name %>| %> <tr> <% for attribute in attributes -%> <td><%%=h <%= singular_name %>.<%= attribute.name %> %></td> |