From bb679d2caef3de4f02acde0a99fe67e43f298a4e Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Tue, 21 Jun 2011 09:04:28 -0400 Subject: [PATCH] elaborate details on why to use _url instead of _path in mailers --- actionmailer/lib/action_mailer/base.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 002576da05..3b91ed37d7 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -123,8 +123,9 @@ module ActionMailer #:nodoc: # # <%= users_url(:host => "example.com") %> # - # You want to avoid using the name_of_route_path form of named routes because it doesn't - # make sense to generate relative URLs in email messages. + # You should use the named_route_url style (which generates absolute URLs) and avoid using the + # named_route_path style (which generates relative URLs), since clients reading the mail will + # have no concept of a current URL from which to determine a relative path. # # It is also possible to set a default host that will be used in all mailers by setting the :host # option as a configuration option in config/application.rb: