1
0
Fork 0
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:
Yehuda Katz + Carl Lerche 2009-08-25 17:04:09 -07:00
parent 469424c85e
commit a21aaca8ea

View file

@ -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