diff options
author | Jerry Tao <taojie@yeezon.com> | 2017-02-22 16:45:15 +0800 |
---|---|---|
committer | Andrew White <andrew.white@unboxed.co> | 2017-02-26 12:22:06 +0000 |
commit | 6ddd65c9f366c5bca70cfce770d144e2fca1e679 (patch) | |
tree | 652027594512eb163cddfef4b2d36c6cd59fec63 /actionpack/lib | |
parent | 228c6c07f1b5e786c72d9e30b2755d764f7a425d (diff) | |
download | rails-6ddd65c9f366c5bca70cfce770d144e2fca1e679.tar.gz rails-6ddd65c9f366c5bca70cfce770d144e2fca1e679.tar.bz2 rails-6ddd65c9f366c5bca70cfce770d144e2fca1e679.zip |
Remove unused params.
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 10d733e477..6e06c70dc2 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -1904,7 +1904,7 @@ module ActionDispatch ast = Journey::Parser.parse path mapping = Mapping.build(@scope, @set, ast, controller, default_action, to, via, formatted, options_constraints, anchor, options) - @set.add_route(mapping, ast, as, anchor) + @set.add_route(mapping, as) end def match_root_route(options) diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 2672cd24ed..c4719f8a71 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -565,7 +565,7 @@ module ActionDispatch routes.empty? end - def add_route(mapping, path_ast, name, anchor) + def add_route(mapping, name) raise ArgumentError, "Invalid route name: '#{name}'" unless name.blank? || name.to_s.match(/^[_a-z]\w*$/i) if name && named_routes[name] |