Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with Rails 3.2.x #1

Merged
merged 1 commit into from
Apr 5, 2012
Merged

Conversation

mguterl
Copy link
Contributor

@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
Copy link
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 added a commit that referenced this pull request Apr 5, 2012
@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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants