From 8c4c196f56b2c86830ea6d64a3046103a3a43e5e Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sat, 5 Nov 2005 02:59:58 +0000 Subject: [PATCH] Scaffold-generated controller action gives paginate the plural_ rather than singular_name. Closes #2743. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2879 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../generators/components/scaffold/templates/controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 9aa33e472e..ddc03e63ba 100644 --- a/railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb +++ b/railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb @@ -12,7 +12,7 @@ class <%= controller_class_name %>Controller < ApplicationController <% end -%> def list<%= suffix %> - @<%= singular_name %>_pages, @<%= plural_name %> = paginate :<%= singular_name %>, :per_page => 10 + @<%= singular_name %>_pages, @<%= plural_name %> = paginate :<%= plural_name %>, :per_page => 10 end def show<%= suffix %>