diff options
author | Xavier Noria <fxn@hashref.com> | 2014-07-30 23:08:59 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2014-07-30 23:08:59 +0200 |
commit | bd944e078d0f40e26d66b03da1449ff9cdcc101b (patch) | |
tree | 23d3b309dd1ac152047fb38d0d3107177b7c6c8a /guides/source/action_mailer_basics.md | |
parent | 30194a5b475ea91f9709f64a08e6645cedbe4cb5 (diff) | |
parent | 2bbcca004cc232cef868cd0e301f274ce5638df0 (diff) | |
download | rails-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/action_mailer_basics.md')
-rw-r--r-- | guides/source/action_mailer_basics.md | 16 |
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 |