From e5ab4b0d07ade8d89d633ca744c0eafbc53ee921 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sun, 31 Jan 2010 18:32:28 -0800 Subject: Convert to class_attribute --- actionpack/lib/action_controller/metal.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_controller/metal.rb') diff --git a/actionpack/lib/action_controller/metal.rb b/actionpack/lib/action_controller/metal.rb index 57627a6f0b..2b35e111ec 100644 --- a/actionpack/lib/action_controller/metal.rb +++ b/actionpack/lib/action_controller/metal.rb @@ -1,4 +1,4 @@ -require 'active_support/core_ext/class/inheritable_attributes' +require 'active_support/core_ext/class/attribute' module ActionController # ActionController::Metal provides a way to get a valid Rack application from a controller. @@ -90,7 +90,12 @@ module ActionController end end - extlib_inheritable_accessor(:middleware_stack) { ActionDispatch::MiddlewareStack.new } + class_attribute :middleware_stack + self.middleware_stack = ActionDispatch::MiddlewareStack.new + + def self.inherited(base) + self.middleware_stack = base.middleware_stack.dup + end def self.use(*args) middleware_stack.use(*args) -- cgit v1.2.3