diff options
-rw-r--r-- | actionpack/CHANGELOG | 2 | ||||
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 95324a4451..9c180eae1b 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Add documentation for redirect_to :back's RedirectBackError exception. [Marcel Molina Jr.] + * Update layout and content_for documentation to use yield rather than magic @content_for instance variables. [Marcel Molina Jr.] * Fix assert_redirected_to tests according to real-world usage. Also, don't fail if you add an extra :controller option: [Rick] diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 5302ee6cad..3ed99ba793 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -850,6 +850,10 @@ module ActionController #:nodoc: # redirect_to :back # # The redirection happens as a "302 Moved" header. + # + # 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 rescueing RedirectBackError. def redirect_to(options = {}, *parameters_for_method_reference) #:doc: case options when %r{^\w+://.*} |