diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-08-11 18:10:41 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-08-11 18:10:41 -0700 |
commit | ea4da199b7d15aaa731c608d7a3a5c59aa8e4801 (patch) | |
tree | 890173a3d7665bb7491a1272677df66a8c25de4b | |
parent | 175280ccb5eff69815f5dcac3a43f4d4c41eea24 (diff) | |
download | rails-ea4da199b7d15aaa731c608d7a3a5c59aa8e4801.tar.gz rails-ea4da199b7d15aaa731c608d7a3a5c59aa8e4801.tar.bz2 rails-ea4da199b7d15aaa731c608d7a3a5c59aa8e4801.zip |
Mapping instances don't need `scope` anymore
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index bffcd8fc54..e30f60d89d 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -76,10 +76,10 @@ module ActionDispatch defaults = (scope[:defaults] || {}).dup scope_constraints = scope[:constraints] || {} - new scope, set, path, defaults, as, controller, default_action, scope[:module], to, formatted, scope_constraints, options + new set, path, defaults, as, controller, default_action, scope[:module], to, formatted, scope_constraints, scope[:blocks], options end - def initialize(scope, set, path, defaults, as, controller, default_action, modyoule, to, formatted, scope_constraints, options) + def initialize(set, path, defaults, as, controller, default_action, modyoule, to, formatted, scope_constraints, blocks, options) @requirements, @conditions = {}, {} @defaults = defaults @set = set @@ -103,7 +103,7 @@ module ActionDispatch split_constraints path_params, scope_constraints.merge(constraints) - @blocks = blocks(options_constraints, scope[:blocks]) + @blocks = blocks(options_constraints, blocks) if options_constraints.is_a?(Hash) split_constraints path_params, options_constraints |