From ea4da199b7d15aaa731c608d7a3a5c59aa8e4801 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 11 Aug 2015 18:10:41 -0700 Subject: Mapping instances don't need `scope` anymore --- actionpack/lib/action_dispatch/routing/mapper.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'actionpack/lib/action_dispatch') 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 -- cgit v1.2.3