diff options
Diffstat (limited to 'actionpack/lib/abstract_controller/base.rb')
-rw-r--r-- | actionpack/lib/abstract_controller/base.rb | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/actionpack/lib/abstract_controller/base.rb b/actionpack/lib/abstract_controller/base.rb index c12b584144..8500cbd7f2 100644 --- a/actionpack/lib/abstract_controller/base.rb +++ b/actionpack/lib/abstract_controller/base.rb @@ -1,4 +1,4 @@ -require 'active_support/ordered_options' +require 'active_support/configurable' module AbstractController class Error < StandardError; end @@ -8,6 +8,8 @@ module AbstractController attr_internal :response_body attr_internal :action_name + include ActiveSupport::Configurable + class << self attr_reader :abstract alias_method :abstract?, :abstract @@ -29,14 +31,6 @@ module AbstractController @descendants ||= [] end - def config - @config ||= ActiveSupport::InheritableOptions.new(superclass < Base ? superclass.config : {}) - end - - def configure - yield 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 @@ -99,10 +93,6 @@ module AbstractController abstract! - def config - @config ||= ActiveSupport::InheritableOptions.new(self.class.config) - end - # Calls the action going through the entire action dispatch stack. # # The actual method that is called is determined by calling @@ -133,6 +123,7 @@ module AbstractController end private + # Returns true if the name can be considered an action. This can # be overridden in subclasses to modify the semantics of what # can be considered an action. |