mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Rework Middleware stack to match the Rack middleware protocol more closely
This commit is contained in:
parent
469424c85e
commit
a21aaca8ea
1 changed files with 3 additions and 3 deletions
|
@ -27,10 +27,10 @@ module ActionDispatch
|
||||||
end
|
end
|
||||||
|
|
||||||
def klass
|
def klass
|
||||||
if @klass.respond_to?(:call)
|
if @klass.respond_to?(:new)
|
||||||
@klass.call
|
|
||||||
elsif @klass.is_a?(Class)
|
|
||||||
@klass
|
@klass
|
||||||
|
elsif @klass.respond_to?(:call)
|
||||||
|
@klass.call
|
||||||
else
|
else
|
||||||
@klass.to_s.constantize
|
@klass.to_s.constantize
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue