rails/rails — Issue #5151: AV::URLHelper#url_for should take account of default url_options
Author: emassip
Created: 2012-02-24 12:46:57+00:00
State: open

If the argument passed to `URLHelper#url_for` is a Hash then the helper forces the `[:only_path]` option value to depending upon the presence of a host value.

This assignment should take account of the presence of the `:host` key in the default url_options defined in controller or anything including the helper.

Thus, including a :host in, e.g., ActionMailer default url_options would have a direct effect in views used by the mailer without the need to pass some ugly `:only_path => !sent_by_mail?` and would bring some consistency with `#url_for` calls from inside mailer.