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
|
||||
|
||||
def klass
|
||||
if @klass.respond_to?(:call)
|
||||
@klass.call
|
||||
elsif @klass.is_a?(Class)
|
||||
if @klass.respond_to?(:new)
|
||||
@klass
|
||||
elsif @klass.respond_to?(:call)
|
||||
@klass.call
|
||||
else
|
||||
@klass.to_s.constantize
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue