From 21142201c9c60fe5d1299cb3b4fb22fb3b7747e7 Mon Sep 17 00:00:00 2001 From: Marcel Molina Date: Tue, 25 Apr 2006 06:32:07 +0000 Subject: Add documentation for redirect_to :back's RedirectBackError exception. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4267 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/CHANGELOG | 2 ++ actionpack/lib/action_controller/base.rb | 4 ++++ 2 files changed, 6 insertions(+) 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 redirect_to :back, 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+://.*} -- cgit v1.2.3