aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2014-07-30 23:08:59 +0200
committerXavier Noria <fxn@hashref.com>2014-07-30 23:08:59 +0200
commitbd944e078d0f40e26d66b03da1449ff9cdcc101b (patch)
tree23d3b309dd1ac152047fb38d0d3107177b7c6c8a /guides/source
parent30194a5b475ea91f9709f64a08e6645cedbe4cb5 (diff)
parent2bbcca004cc232cef868cd0e301f274ce5638df0 (diff)
downloadrails-bd944e078d0f40e26d66b03da1449ff9cdcc101b.tar.gz
rails-bd944e078d0f40e26d66b03da1449ff9cdcc101b.tar.bz2
rails-bd944e078d0f40e26d66b03da1449ff9cdcc101b.zip
Merge pull request #15840 from schneems/schneems/deprecate-mailer_path_methods
Deprecate `*_path` methods in mailers
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/action_mailer_basics.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/guides/source/action_mailer_basics.md b/guides/source/action_mailer_basics.md
index cb1c1c653d..9ad9319255 100644
--- a/guides/source/action_mailer_basics.md
+++ b/guides/source/action_mailer_basics.md
@@ -414,6 +414,22 @@ globally in `config/application.rb`:
config.action_mailer.default_url_options = { host: 'example.com' }
```
+Because of this behavior you cannot use any of the `*_path` helpers inside of
+an email. Instead you will need to use the associated `*_url` helper. For example
+instead of using
+
+```
+<%= link_to 'welcome', welcome_path %>
+```
+
+You will need to use:
+
+```
+<%= link_to 'welcome', welcome_url %>
+```
+
+By using the full URL, your links will now work in your emails.
+
#### generating URLs with `url_for`
You need to pass the `only_path: false` option when using `url_for`. This will