diff options
Diffstat (limited to 'actionpack/lib/action_dispatch/routing/mapper.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 4ec1b8ee1f..c412484895 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -1,7 +1,6 @@ require "active_support/core_ext/hash/slice" require "active_support/core_ext/enumerable" require "active_support/core_ext/array/extract_options" -require "active_support/core_ext/regexp" require "action_dispatch/routing/redirection" require "action_dispatch/routing/endpoint" @@ -1558,11 +1557,7 @@ module ActionDispatch options = path path, to = options.find { |name, _value| name.is_a?(String) } - if path.nil? - ActiveSupport::Deprecation.warn "Omitting the route path is deprecated. "\ - "Specify the path with a String or a Symbol instead." - path = "" - end + raise ArgumentError, "Route path not specified" if path.nil? case to when Symbol @@ -1844,18 +1839,7 @@ module ActionDispatch path_types.fetch(String, []).each do |_path| route_options = options.dup if _path && option_path - ActiveSupport::Deprecation.warn <<-eowarn -Specifying strings for both :path and the route path is deprecated. Change things like this: - - match #{_path.inspect}, :path => #{option_path.inspect} - -to this: - - match #{option_path.inspect}, :as => #{_path.inspect}, :action => #{_path.inspect} - eowarn - route_options[:action] = _path - route_options[:as] = _path - _path = option_path + raise ArgumentError, "Ambigous route definition. Both :path and the route path where specified as strings." end to = get_to_from_path(_path, to, route_options[:action]) decomposed_match(_path, controller, route_options, _path, to, via, formatted, anchor, options_constraints) |