aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-10-07 19:12:02 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-10-07 19:12:02 +0000
commitd9f3c435f907b8097669a7f2c923f731837fb045 (patch)
tree68826445dfcadb167950e318f19c807711971d9c /actionpack/lib/action_controller
parentc90d31eb376ebe331394112697ec33a22f61c2d8 (diff)
downloadrails-d9f3c435f907b8097669a7f2c923f731837fb045.tar.gz
rails-d9f3c435f907b8097669a7f2c923f731837fb045.tar.bz2
rails-d9f3c435f907b8097669a7f2c923f731837fb045.zip
Fix url_for, redirect_to, etc. with :controller => :symbol instead of 'string'. Closes #8562, #9525.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7776 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r--actionpack/lib/action_controller/assertions/response_assertions.rb3
-rw-r--r--actionpack/lib/action_controller/routing.rb3
2 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/assertions/response_assertions.rb b/actionpack/lib/action_controller/assertions/response_assertions.rb
index f45727f508..4108695f07 100644
--- a/actionpack/lib/action_controller/assertions/response_assertions.rb
+++ b/actionpack/lib/action_controller/assertions/response_assertions.rb
@@ -69,6 +69,7 @@ module ActionController
end
if value.respond_to?(:[]) && value['controller']
+ value['controller'] = value['controller'].to_s
if key == :actual && value['controller'].first != '/' && !value['controller'].include?('/')
new_controller_path = ActionController::Routing.controller_relative_to(value['controller'], @controller.class.controller_path)
value['controller'] = new_controller_path if value['controller'] != new_controller_path && ActionController::Routing.possible_controllers.include?(new_controller_path)
@@ -138,4 +139,4 @@ module ActionController
end
end
end
-end \ No newline at end of file
+end
diff --git a/actionpack/lib/action_controller/routing.rb b/actionpack/lib/action_controller/routing.rb
index 7442adbb39..3a4d2aafe3 100644
--- a/actionpack/lib/action_controller/routing.rb
+++ b/actionpack/lib/action_controller/routing.rb
@@ -1325,6 +1325,9 @@ module ActionController
options = options_as_params(options)
expire_on = build_expiry(options, recall)
+ if options[:controller]
+ options[:controller] = options[:controller].to_s
+ end
# if the controller has changed, make sure it changes relative to the
# current controller module, if any. In other words, if we're currently
# on admin/get, and the new controller is 'set', the new controller