diff options
author | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-08-25 17:04:09 -0700 |
---|---|---|
committer | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-08-25 17:04:09 -0700 |
commit | a21aaca8eaa8f451fb0ec4814b51323439bd36ff (patch) | |
tree | f4a07b0df651027720564ce3627b3f9bb6e513d7 /actionpack | |
parent | 469424c85e877c4c6f822c31e8462ff1778550eb (diff) | |
download | rails-a21aaca8eaa8f451fb0ec4814b51323439bd36ff.tar.gz rails-a21aaca8eaa8f451fb0ec4814b51323439bd36ff.tar.bz2 rails-a21aaca8eaa8f451fb0ec4814b51323439bd36ff.zip |
Rework Middleware stack to match the Rack middleware protocol more closely
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/stack.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/stack.rb b/actionpack/lib/action_dispatch/middleware/stack.rb index ade2d6f05e..4f71ea6165 100644 --- a/actionpack/lib/action_dispatch/middleware/stack.rb +++ b/actionpack/lib/action_dispatch/middleware/stack.rb @@ -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 |