diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-01-03 17:17:16 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-01-04 11:58:42 -0300 |
commit | d282125a18c1697a9b5bb775628a2db239142ac7 (patch) | |
tree | 417ae772b2eb01111dcbe6c83674f19bab9ba7ca /actionpack/lib | |
parent | 2cc91c37bc2e32b7a04b2d782fb8f4a69a14503f (diff) | |
download | rails-d282125a18c1697a9b5bb775628a2db239142ac7.tar.gz rails-d282125a18c1697a9b5bb775628a2db239142ac7.tar.bz2 rails-d282125a18c1697a9b5bb775628a2db239142ac7.zip |
Remove deprecate `*_path` helpers in email views
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 0e9e44432c..3f1793b405 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -87,7 +87,7 @@ module ActionDispatch # named routes. class NamedRouteCollection #:nodoc: include Enumerable - attr_reader :routes, :url_helpers_module + attr_reader :routes, :url_helpers_module, :path_helpers_module def initialize @routes = {} @@ -162,25 +162,6 @@ module ActionDispatch routes.length end - def path_helpers_module(warn = false) - if warn - mod = @path_helpers_module - helpers = @path_helpers - Module.new do - include mod - - helpers.each do |meth| - define_method(meth) do |*args, &block| - ActiveSupport::Deprecation.warn("The method `#{meth}` cannot be used here as a full URL is required. Use `#{meth.to_s.sub(/_path$/, '_url')}` instead") - super(*args, &block) - end - end - end - else - @path_helpers_module - end - end - class UrlHelper # :nodoc: def self.create(route, options, route_name, url_strategy) if optimize_helper?(route) @@ -500,12 +481,10 @@ module ActionDispatch if supports_path path_helpers = routes.named_routes.path_helpers_module - else - path_helpers = routes.named_routes.path_helpers_module(true) - end - include path_helpers - extend path_helpers + include path_helpers + extend path_helpers + end # plus a singleton class method called _routes ... included do |