Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Give ControllerRedirectionInformation the ability to properly handle …

…HashWithIndifferentAccess.
  • Loading branch information...
commit 0d65ee90bfe6146439cb4f67050f2e7a3d445e8c 1 parent c12aba3
@FooBarWidget authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/auto_redirection/redirection_information.rb
View
7 lib/auto_redirection/redirection_information.rb
@@ -93,9 +93,14 @@ def path
include ActionController::UrlWriter
end
url_generator = klass.new
- args = params.merge(:only_path => true,
+ args = params.with_indifferent_access.merge(
+ :only_path => true,
:controller => controller,
:action => action)
+ # Turn into a normal Hash. url_for doesn't play well with
+ # HashWithIndifferentAccess.
+ args = {}.merge(args)
+ args.symbolize_keys!
return URI.parse(url_generator.url_for(args)).path
end
Please sign in to comment.
Something went wrong with that request. Please try again.