提交 ea4da199 编写于 作者: A Aaron Patterson

Mapping instances don't need `scope` anymore

上级 175280cc
......@@ -76,10 +76,10 @@ def self.build(scope, set, path, as, controller, default_action, to, options)
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 @@ def initialize(scope, set, path, defaults, as, controller, default_action, modyo
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册