aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-03 17:34:50 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-04 11:58:42 -0300
commite4e1fd7ade47771067177254cb133564a3422b8a (patch)
tree16fa97e771d1b409a3af7a81f64b9c435271af00 /actionpack/lib
parentd282125a18c1697a9b5bb775628a2db239142ac7 (diff)
downloadrails-e4e1fd7ade47771067177254cb133564a3422b8a.tar.gz
rails-e4e1fd7ade47771067177254cb133564a3422b8a.tar.bz2
rails-e4e1fd7ade47771067177254cb133564a3422b8a.zip
Remove deprecated `only_path` option on `*_path` helpers
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_dispatch/routing/route_set.rb29
1 files changed, 1 insertions, 28 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb
index 3f1793b405..f23aec0691 100644
--- a/actionpack/lib/action_dispatch/routing/route_set.rb
+++ b/actionpack/lib/action_dispatch/routing/route_set.rb
@@ -130,7 +130,7 @@ module ActionDispatch
@url_helpers_module.send :undef_method, url_name
end
routes[key] = route
- define_url_helper @path_helpers_module, route, path_name, route.defaults, name, LEGACY
+ define_url_helper @path_helpers_module, route, path_name, route.defaults, name, PATH
define_url_helper @url_helpers_module, route, url_name, route.defaults, name, UNKNOWN
@path_helpers << path_name
@@ -319,34 +319,7 @@ module ActionDispatch
# :stopdoc:
# strategy for building urls to send to the client
PATH = ->(options) { ActionDispatch::Http::URL.path_for(options) }
- FULL = ->(options) { ActionDispatch::Http::URL.full_url_for(options) }
UNKNOWN = ->(options) { ActionDispatch::Http::URL.url_for(options) }
- LEGACY = ->(options) {
- if options.key?(:only_path)
- if options[:only_path]
- ActiveSupport::Deprecation.warn(<<-MSG.squish)
- You are calling a `*_path` helper with the `only_path` option
- explicitly set to `true`. This option will stop working on
- path helpers in Rails 5. Simply remove the `only_path: true`
- argument from your call as it is redundant when applied to a
- path helper.
- MSG
-
- PATH.call(options)
- else
- ActiveSupport::Deprecation.warn(<<-MSG.squish)
- You are calling a `*_path` helper with the `only_path` option
- explicitly set to `false`. This option will stop working on
- path helpers in Rails 5. Use the corresponding `*_url` helper
- instead.
- MSG
-
- FULL.call(options)
- end
- else
- PATH.call(options)
- end
- }
# :startdoc:
attr_accessor :formatter, :set, :named_routes, :default_scope, :router