1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionmailer/lib/action_mailer
@schneems and @sgrif 2bbcca004c Deprecate *_path methods in mailers
Email does not support relative links since there is no implicit host. Therefore all links inside of emails must be fully qualified URLs. All path helpers are now deprecated. When removed, the error will give early indication to developers to use `*_url` methods instead.

Currently if a developer uses a `*_path` helper, their tests and `mail_view` will not catch the mistake. The only way to see the error is by sending emails in production. Preventing sending out emails with non-working path's is the desired end goal of this PR.

Currently path helpers are mixed-in to controllers (the ActionMailer::Base acts as a controller). All `*_url` and `*_path` helpers are made available through the same module. This PR separates this behavior into two modules so we can extend the `*_path` methods to add a Deprecation to them. Once deprecated we can use this same area to raise a NoMethodError and add an informative message directing the developer to use `*_url` instead.

The module with warnings is only mixed in when a controller returns false from the newly added `supports_relative_path?`.

Paired @sgrif & @schneems
2014-07-30 12:01:45 -05:00
..
base.rb Deprecate *_path methods in mailers 2014-07-30 12:01:45 -05:00
collector.rb Revert "ActionMailer::Collector should be nodoc'd" 2013-05-19 21:06:38 +05:30
delivery_methods.rb Don't mutate the Base settings by merge!ing the given value 2013-09-10 18:10:48 +02:00
gem_version.rb Introduce Rails.gem_version 2014-03-05 12:37:38 -05:00
log_subscriber.rb Prefer to pass block when logging. 2014-07-18 15:04:43 +08:00
mail_helper.rb Remove unused block parameter from #gsub call in AM::MailHelper#block_format 2014-06-19 17:40:37 +03:00
preview.rb Rename preview_enabled option to show_previews 2014-07-01 13:09:24 -03:00
railtie.rb Deprecate *_path methods in mailers 2014-07-30 12:01:45 -05:00
test_case.rb Restore test deliveries properly in ActionMailer. 2014-06-07 00:11:24 +08:00
test_helper.rb Use "Action Mailer" as canonical name in documentation [ci skip] 2014-05-26 16:38:44 -07:00
version.rb Pass through AM documentation re: 02d048d [ci skip] 2014-05-26 16:45:50 -07:00