提交 7fe14432 编写于 作者: A Aaron Patterson

constraints class does not need the request class anymore

上级 402c2af5
......@@ -19,7 +19,7 @@ class Mapper
class Constraints < Endpoint #:nodoc:
attr_reader :app, :constraints
def initialize(app, constraints, request, dispatcher_p)
def initialize(app, constraints, dispatcher_p)
# Unwrap Constraints objects. I don't actually think it's possible
# to pass a Constraints object to this constructor, but there were
# multiple places that kept testing children of this object. I
......@@ -31,7 +31,7 @@ def initialize(app, constraints, request, dispatcher_p)
@dispatcher = dispatcher_p
@app, @constraints, @request = app, constraints, request
@app, @constraints, = app, constraints
end
def dispatcher?; @dispatcher; end
......@@ -226,11 +226,11 @@ def app
if Redirect === to
to
else
Constraints.new(to, blocks, @set.request_class, false)
Constraints.new(to, blocks, false)
end
else
if blocks.any?
Constraints.new(dispatcher, blocks, @set.request_class, true)
Constraints.new(dispatcher, blocks, true)
else
dispatcher
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册