Agree with the feature request. I made this error too.

2014-06-12 18:04 GMT+00:00 Vipul A M <[email protected]>:

> I have been bitten by this too, and agree with it.
>
> I think resolving a full URL would be better. People sometimes reuse
> normal views from Mailers, and would be better off using *_path
> helpers there.
>
> Exceptions would cause an issue. (A warning maybe?)
> Vipul A.M.
> +91-8149-204995
>
>
> On Thu, Jun 12, 2014 at 11:28 PM, richard schneeman
> <[email protected]> wrote:
> > Here's a change in behavior I would love on the mailers.
> >
> > ## Backstory
> >
> > When you send an email, you'll likely need links. Those links must be the
> > full path i.e. 'http://example.com/foo' instead of relative (just
> '/foo').
> > Unfortunately most devs are so used to using the *_path helpers, they use
> > them in emails by mistake.
> >
> > I made this mistake recently with http://www.codetriage.com, here's the
> PR
> > that fixes it (https://github.com/codetriage/codetriage/pull/257). The
> sad
> > part is I didn't realize there was a problem until a user got an email
> and
> > couldn't click on a link. Then they had to be nice enough to report it.
> If
> > your business is running on Rails, this may take days. I've been doing
> this
> > for years, and it still happens to me.
> >
> >
> > ## Feature
> >
> > Here's what I would like to see happen. Either raise an exception when
> > *_path helpers are used in a mail template so my tests would have caught
> it,
> > or likely just have *_path helpers resolve to the full URL by default.
> What
> > do you think?
> >
> >
> > --
> > Richard Schneeman
> >
> > --
> > 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.
>
> --
> 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.
>

-- 
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