aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/base.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2004-12-13 11:35:48 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2004-12-13 11:35:48 +0000
commit922f817a5a369adc8cb0dd53f332785ee20a667a (patch)
tree8a0cf0b51e59e9fe35a12938a198b436ecc65212 /actionpack/lib/action_controller/base.rb
parent0cce17f811a7e5217e667b40c44f788e3559f790 (diff)
downloadrails-922f817a5a369adc8cb0dd53f332785ee20a667a.tar.gz
rails-922f817a5a369adc8cb0dd53f332785ee20a667a.tar.bz2
rails-922f817a5a369adc8cb0dd53f332785ee20a667a.zip
Added the option of passing false to :module or :controller_prefix in order to "break out" of a module or prefix
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@142 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/base.rb')
-rwxr-xr-xactionpack/lib/action_controller/base.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb
index a7271e9c91..8bcf12a1a9 100755
--- a/actionpack/lib/action_controller/base.rb
+++ b/actionpack/lib/action_controller/base.rb
@@ -271,10 +271,11 @@ module ActionController #:nodoc:
# .---> controller .--> action
# /library/books/ISBN/0743536703/show
# '------> '--------------> action_prefix
- # controller_prefix
+ # controller_prefix (or module)
#
# * <tt>:controller_prefix</tt> - specifies the string before the controller name, which would be "/library" for the example.
# Called with "/shop" gives "/shop/books/ISBN/0743536703/show".
+ # * <tt>:module</tt> - serves as a alias to :controller_prefix (overwrites :controller_prefix unless its nil)
# * <tt>:controller</tt> - specifies a new controller and clears out everything after the controller name (including the action,
# the pre- and suffix, and all params), so called with "settings" gives "/library/settings/".
# * <tt>:action_prefix</tt> - specifies the string between the controller name and the action name, which would
@@ -297,6 +298,7 @@ module ActionController #:nodoc:
# Naturally, you can combine multiple options in a single redirect. Examples:
#
# redirect_to(:controller_prefix => "/shop", :controller => "settings")
+ # redirect_to(:controller_prefix => false, :controller => "settings") # breaks out of the current controller_prefix
# redirect_to(:action => "edit", :id => 3425)
# redirect_to(:action => "edit", :path_params => { "type" => "XTC" }, :params => { "temp" => 1})
# redirect_to(:action => "publish", :action_prefix => "/published", :anchor => "x14")