So the consensus seems to be that in order to get URLs working in the emails your application sends, you have to set config.action_mailer.default_url_options
.
This is well and good if you're using whatever_url
or url_for
, but what if there's some helper or partial that you want to use to generate an email that uses whatever_*path*
, e.g., song_path(:song_slug => song, :artist_slug => song.artist)
?
How can I use such a helper in an email template without changing all these url-generating methods? Also, I thought using whatever_path
instead of whatever_url
was considered a best practice. If whatever_path
is useless for email though, should I start using whatever_url
everywhere in my application?