On Wed, Jun 18, 2014 at 12:33 AM, Xavier Noria <[email protected]> wrote:

> I cannot think of a valid use case for *_path in mailer views, so after
> thinking about it I personally would be inclined to remove them.
>
> People cannot upgrade and have their mailers crashing in production, so I
> think we have no option but to go through a deprecation cycle.
>
> If someone had a rare need to generate a path and the helpers were gone,
> they could still opt-in via *_url(only_path: true), which is something we
> could document in small font :).
>
> The mailer guide would need to reflect these changes.
>
> What do you think?
>

For HTML emails, using a <base> tag allows you to use relative URLs safely.
 It's easier to specify the base path in a single place and and use
relative URLs, as opposed to using an absolute path with the same base path
in every link (which is not very DRY).

Unfortunately, such an approach does not work for plain text email, so it
makes sense to deprecate them in the plain text case (if it is possible to
do so only in that case, but allow it for HTML email).

Unfortunately, for mail_view, I don't think the <base> tag approach will
work, unless you used a new window/frame for the HTML email.

Jeremy

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.

Reply via email to