aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
diff options
context:
space:
mode:
authorMatt Jankowski <mjankowski@thoughtbot.com>2011-06-21 09:04:28 -0400
committerMatt Jankowski <mjankowski@thoughtbot.com>2011-06-21 09:04:28 -0400
commit1f4fb6f6355bdf8f16f52c8803d8d26ddb1a81ef (patch)
tree4933d7679463737de137c000cb7251f4a17cfcdd /actionmailer
parentc01c954c20e64119ea73f3b71c4d843d66fda64e (diff)
downloadrails-1f4fb6f6355bdf8f16f52c8803d8d26ddb1a81ef.tar.gz
rails-1f4fb6f6355bdf8f16f52c8803d8d26ddb1a81ef.tar.bz2
rails-1f4fb6f6355bdf8f16f52c8803d8d26ddb1a81ef.zip
elaborate details on why to use _url instead of _path in mailers
Diffstat (limited to 'actionmailer')
-rw-r--r--actionmailer/lib/action_mailer/base.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index e53f548523..490ffc00c3 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -122,8 +122,9 @@ module ActionMailer #:nodoc:
#
# <%= users_url(:host => "example.com") %>
#
- # You want to avoid using the <tt>name_of_route_path</tt> form of named routes because it doesn't
- # make sense to generate relative URLs in email messages.
+ # You should use the <tt>named_route_url</tt> style (which generates absolute URLs) and avoid using the
+ # <tt>named_route_path</tt> 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 <tt>:host</tt>
# option as a configuration option in <tt>config/application.rb</tt>: