diff options
author | Mikel Lindsaar <raasdnil@gmail.com> | 2010-09-09 13:37:21 +1000 |
---|---|---|
committer | Mikel Lindsaar <raasdnil@gmail.com> | 2010-09-09 14:05:06 +1000 |
commit | 1a8d77d82511daee93a703a3e785115110aff1c2 (patch) | |
tree | f7e34b68dfc1506bc66be31946f130eeb3cefca5 /actionpack/lib/action_controller/metal/redirecting.rb | |
parent | 03377c755fdc7619fb62b82f1ea823519b1b78d7 (diff) | |
download | rails-1a8d77d82511daee93a703a3e785115110aff1c2.tar.gz rails-1a8d77d82511daee93a703a3e785115110aff1c2.tar.bz2 rails-1a8d77d82511daee93a703a3e785115110aff1c2.zip |
Adding linkage to redirect_to from Base and adding status code option reference
Diffstat (limited to 'actionpack/lib/action_controller/metal/redirecting.rb')
-rw-r--r-- | actionpack/lib/action_controller/metal/redirecting.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/metal/redirecting.rb b/actionpack/lib/action_controller/metal/redirecting.rb index b5f1d23ef0..10d7794b57 100644 --- a/actionpack/lib/action_controller/metal/redirecting.rb +++ b/actionpack/lib/action_controller/metal/redirecting.rb @@ -38,6 +38,9 @@ module ActionController # redirect_to :action=>'atom', :status => :moved_permanently # redirect_to post_url(@post), :status => 301 # redirect_to :action=>'atom', :status => 302 + # + # The status code can either be a standard {HTTP Status code}[http://www.iana.org/assignments/http-status-codes] as an + # integer, or a symbol representing the downcased, underscored and symbolized description. # # It is also possible to assign a flash message as part of the redirection. There are two special accessors for commonly used the flash names # +alert+ and +notice+ as well as a general purpose +flash+ bucket. @@ -48,8 +51,7 @@ module ActionController # redirect_to post_url(@post), :status => 301, :flash => { :updated_post_id => @post.id } # redirect_to { :action=>'atom' }, :alert => "Something serious happened" # - # When using <tt>redirect_to :back</tt>, if there is no referrer, - # RedirectBackError will be raised. You may specify some fallback + # When using <tt>redirect_to :back</tt>, if there is no referrer, RedirectBackError will be raised. You may specify some fallback # behavior for this case by rescuing RedirectBackError. def redirect_to(options = {}, response_status = {}) #:doc: raise ActionControllerError.new("Cannot redirect to nil!") if options.nil? |