diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-20 05:39:13 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-20 05:39:13 +0000 |
commit | faecde0ec8c82637ce691fffd7e45e0c623865ba (patch) | |
tree | 1581d18faa283cddf5028e5c060a2f9f74284367 /railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb | |
parent | 6f8c99fa34692f44c4470e0ef155ecc1c8b32cd2 (diff) | |
download | rails-faecde0ec8c82637ce691fffd7e45e0c623865ba.tar.gz rails-faecde0ec8c82637ce691fffd7e45e0c623865ba.tar.bz2 rails-faecde0ec8c82637ce691fffd7e45e0c623865ba.zip |
My beautiful eyes [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3993 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb')
-rw-r--r-- | railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb | 10 |
1 files changed, 3 insertions, 7 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 9595fcca61..c059e74536 100644 --- a/railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb +++ b/railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb @@ -11,13 +11,9 @@ class <%= controller_class_name %>Controller < ApplicationController end <% end -%> - - # GET should only be used for operations which are 'safe', or read-only. So require - # post for all actions which change state. - # - # http://www.w3.org/2001/tag/doc/whenToUseGet.html - verify :method=>:post, :only=>[:destroy<%= suffix %>, :create<%= suffix %>, :update<%= suffix %>], - :redirect_to=> {:action=>:list<%= suffix %>} + # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html) + verify :method => :post, :only => [ :destroy<%= suffix %>, :create<%= suffix %>, :update<%= suffix %> ], + :redirect_to => { :action => :list<%= suffix %> } def list<%= suffix %> @<%= singular_name %>_pages, @<%= plural_name %> = paginate :<%= plural_name %>, :per_page => 10 |