From 1f0f05b10c924d2f0d0ff4c74cbd979e77deea1d Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Wed, 3 Mar 2010 19:45:08 -0800 Subject: Move the original config method onto AbstractController --- actionpack/lib/abstract_controller/base.rb | 8 ++++++++ actionpack/lib/action_controller/metal.rb | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/abstract_controller/base.rb b/actionpack/lib/abstract_controller/base.rb index e14818e464..cbd021e246 100644 --- a/actionpack/lib/abstract_controller/base.rb +++ b/actionpack/lib/abstract_controller/base.rb @@ -28,6 +28,10 @@ module AbstractController @descendants ||= [] end + def config + @config ||= ActiveSupport::InheritableOptions.new(superclass < Base ? superclass.config : {}) + end + # A list of all internal methods for a controller. This finds the first # abstract superclass of a controller, and gets a list of all public # instance methods on that abstract class. Public instance methods of @@ -95,6 +99,10 @@ module AbstractController @_formats = nil end + def config + self.class.config + end + # Calls the action going through the entire action dispatch stack. # # The actual method that is called is determined by calling diff --git a/actionpack/lib/action_controller/metal.rb b/actionpack/lib/action_controller/metal.rb index 1f6bbeb7c5..4374ab0a6b 100644 --- a/actionpack/lib/action_controller/metal.rb +++ b/actionpack/lib/action_controller/metal.rb @@ -11,14 +11,6 @@ module ActionController class Metal < AbstractController::Base abstract! - def self.config - @config ||= ActiveSupport::InheritableOptions.new(superclass < Metal ? superclass.config : {}) - end - - def config - self.class.config - end - # :api: public attr_internal :params, :env -- cgit v1.2.3