ahoward/rails_default_url_options — pull request #1 by mguterl (2012-04-04 18:15:36+00:00)
Title: Issues with Rails 3.2.x

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: https://github.com/rails/rails/commit/c41f08cefe6fa3747ee79001d9c88dc988e8064d 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.