aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
diff options
context:
space:
mode:
authorAlberto Almagro <albertoalmagro@gmail.com>2019-05-22 23:31:22 +0200
committerAlberto Almagro <albertoalmagro@gmail.com>2019-05-22 23:59:18 +0200
commit20104ba13daae81184a339b8949054aecbbd7655 (patch)
tree4e59668361d15dd110bce665105d1f60325f2ae7 /actionpack/lib/action_dispatch
parent963b3ed9b670dd44e2cf1c61c894f0b849847a25 (diff)
downloadrails-20104ba13daae81184a339b8949054aecbbd7655.tar.gz
rails-20104ba13daae81184a339b8949054aecbbd7655.tar.bz2
rails-20104ba13daae81184a339b8949054aecbbd7655.zip
Remove Route#build as it wasn't used
After @kamipo CR feedback we realized `Route#build` wasn't used. As it is also private API being able to create Routes both with `#new` and `#build` was redundant.
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r--actionpack/lib/action_dispatch/journey/route.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/actionpack/lib/action_dispatch/journey/route.rb b/actionpack/lib/action_dispatch/journey/route.rb
index d497b9d475..4aee7a6f83 100644
--- a/actionpack/lib/action_dispatch/journey/route.rb
+++ b/actionpack/lib/action_dispatch/journey/route.rb
@@ -49,16 +49,10 @@ module ActionDispatch
end
end
- def self.build(name, app, path, constraints, required_defaults, defaults)
- new name: name, app: app, path: path, constraints: constraints,
- required_defaults: required_defaults, defaults: defaults,
- request_method_match: verb_matcher(constraints.delete(:request_method))
- end
-
##
# +path+ is a path constraint.
# +constraints+ is a hash of constraints to be applied to this route.
- def initialize(name:, app:, path:, constraints:, required_defaults:, defaults:, request_method_match:, precedence: 0, scope_options: {}, internal: false)
+ def initialize(name:, app: nil, path:, constraints: {}, required_defaults: [], defaults: {}, request_method_match: nil, precedence: 0, scope_options: {}, internal: false)
@name = name
@app = app
@path = path