aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2006-06-21 02:19:40 +0000
committerRick Olson <technoweenie@gmail.com>2006-06-21 02:19:40 +0000
commita28817948dd41bdf921a0976d711e955d959dda2 (patch)
tree1683b077fbabd50352bd8829f9000924716df59c
parent5525b79b636b39875d6cd4aa1386d8dec4beb6ce (diff)
downloadrails-a28817948dd41bdf921a0976d711e955d959dda2.tar.gz
rails-a28817948dd41bdf921a0976d711e955d959dda2.tar.bz2
rails-a28817948dd41bdf921a0976d711e955d959dda2.zip
documentation fixes for ActionController::Verification::ClassMethods verify method. Closes #4310. [oleg.frolov@gmail.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4479 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r--actionpack/lib/action_controller/verification.rb15
1 files changed, 10 insertions, 5 deletions
diff --git a/actionpack/lib/action_controller/verification.rb b/actionpack/lib/action_controller/verification.rb
index cd6f777486..8e0b255f26 100644
--- a/actionpack/lib/action_controller/verification.rb
+++ b/actionpack/lib/action_controller/verification.rb
@@ -17,14 +17,18 @@ module ActionController #:nodoc:
# Usage:
#
# class GlobalController < ActionController::Base
- # # prevent the #update_settings action from being invoked unless
- # # the 'admin_privileges' request parameter exists.
+ # # Prevent the #update_settings action from being invoked unless
+ # # the 'admin_privileges' request parameter exists. The
+ # # settings action will be redirected to in current controller
+ # # if verification fails.
# verify :params => "admin_privileges", :only => :update_post,
# :redirect_to => { :action => "settings" }
#
- # # disallow a post from being updated if there was no information
+ # # Disallow a post from being updated if there was no information
# # submitted with the post, and if there is no active post in the
- # # session, and if there is no "note" key in the flash.
+ # # session, and if there is no "note" key in the flash. The route
+ # # named category_url will be redirected to if verification fails.
+ #
# verify :params => "post", :session => "post", "flash" => "note",
# :only => :update_post,
# :add_flash => { "alert" => "Failed to create your message" },
@@ -54,7 +58,8 @@ module ActionController #:nodoc:
# merged into the response's headers hash if the prerequisites cannot
# be satisfied.
# * <tt>:redirect_to</tt>: the redirection parameters to be used when
- # redirecting if the prerequisites cannot be satisfied.
+ # redirecting if the prerequisites cannot be satisfied. You can
+ # redirect either to named route or to the action in some controller.
# * <tt>:render</tt>: the render parameters to be used when
# the prerequisites cannot be satisfied.
# * <tt>:only</tt>: only apply this verification to the actions specified