1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionpack/lib/abstract_controller
@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
..
railties Deprecate *_path methods in mailers 2014-07-30 12:01:45 -05:00
asset_paths.rb 🔥 Rails asset id support 2012-10-15 09:47:16 -05:00
base.rb Deprecate *_path methods in mailers 2014-07-30 12:01:45 -05:00
callbacks.rb Partially revert deprecation of *_filter 2014-06-03 19:53:28 -03:00
collector.rb Improve a couple exception messages related to variants and mime types 2013-12-03 22:23:12 -02:00
helpers.rb move MissingHelperError out of the ClassMethods module. 2013-07-12 15:34:29 +02:00
logger.rb avoid empty api pages 2012-04-08 01:56:41 +05:30
rendering.rb Check if the request variable isn't nil when calling render_to_string 2014-02-20 20:53:47 +02:00
translation.rb change useless gsub to tr 2013-03-05 09:33:42 -05:00
url_for.rb fixed a typo [ci skip] 2014-05-17 00:29:09 +09:00