Issues with Rails 3.2.x #1

Merged
merged 1 commit into from Apr 5, 2012

Projects

None yet

2 participants

@mguterl
mguterl commented Apr 4, 2012

Trying to upgrade our Rails app that uses default_url_options and "ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true" started popping up during our specs.

It looks like this change in Rails: rails/rails@c41f08c makes the assumption that the keys will always be symbols.

Unfortunately this is happening:

>> default_url_options
=> {"host"=>"example.org", "protocol"=>"https://"}

>> default_url_options[:host]
=> "example.org"

>> {}.reverse_merge!(default_url_options)[:host]
=> nil

Simply changing DefaultUrlOptions from a HashWithIndifferentAccess to a Hash seems to fix all of our issues. Thank you for your consideration.

@ahoward
Owner
ahoward commented Apr 5, 2012

this bums me out, but seem prudent for now. i fixed the issue in rails, but it'll be a while to make a release

rails/rails#5750

thanks @mguterl !

@ahoward ahoward merged commit af7faca into ahoward:master Apr 5, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment