diff options
author | Gabe da Silveira <gabe@websaviour.com> | 2008-06-02 19:57:35 -0300 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-06-04 11:08:58 +1200 |
commit | 025515b234d8380f195e3de3818d076302605b12 (patch) | |
tree | ea615e7182e18f01443175a3c32797bb7e24636e /actionpack/lib | |
parent | e3c26e9926948587efcc8d31c729395093407df6 (diff) | |
download | rails-025515b234d8380f195e3de3818d076302605b12.tar.gz rails-025515b234d8380f195e3de3818d076302605b12.tar.bz2 rails-025515b234d8380f195e3de3818d076302605b12.zip |
Fix assert_redirected_to for nested controllers and named routes
[#308 state:resolved]
Signed-off-by: Michael Koziarski <michael@koziarski.com>
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/assertions/response_assertions.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/assertions/response_assertions.rb b/actionpack/lib/action_controller/assertions/response_assertions.rb index c5fc6c7966..3deda0b45a 100644 --- a/actionpack/lib/action_controller/assertions/response_assertions.rb +++ b/actionpack/lib/action_controller/assertions/response_assertions.rb @@ -97,7 +97,7 @@ module ActionController 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) + value['controller'] = new_controller_path if value['controller'] != new_controller_path && ActionController::Routing.possible_controllers.include?(new_controller_path) && @response.redirected_to.is_a?(Hash) end value['controller'] = value['controller'][1..-1] if value['controller'].first == '/' # strip leading hash end |