On Friday, 8 August 2014 07:00:32 UTC-4, Ruby-Forum.com User wrote: > > I have a rake task, which informs users about all kind of statuses in > the application by e-mail. > > It would be nice if I could create active links together with statuses. > But have noticed that link_to helper is not available for rake or > ActionMailer. Is there an easy way to include link_to helper in rake or > example below is the only sane way of doing it :-( > > body << '<a href="http://my.site.com/link">Link</a>' > > Use a template. All the usual view helpers will be available there. You'll also want to make sure you set `default_url_options`:
http://guides.rubyonrails.org/action_mailer_basics.html#generating-urls-in-action-mailer-views otherwise all your links will be missing the host part. --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/e3ac8665-6a57-456b-91bb-dea3b21f41df%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

