From d9f3c435f907b8097669a7f2c923f731837fb045 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sun, 7 Oct 2007 19:12:02 +0000 Subject: 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 --- actionpack/lib/action_controller/routing.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'actionpack/lib/action_controller/routing.rb') 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 -- cgit v1.2.3