Add a method for configuring abstract controllers

This commit is contained in:
Carl Lerche 2010-03-04 00:52:10 -08:00
parent 5ce25aecee
commit 9eddc85444
1 changed files with 4 additions and 0 deletions

View File

@ -34,6 +34,10 @@ module AbstractController
@config ||= ActiveSupport::InheritableOptions.new(superclass < Base ? superclass.config : {}) @config ||= ActiveSupport::InheritableOptions.new(superclass < Base ? superclass.config : {})
end end
def configure
yield config
end
# A list of all internal methods for a controller. This finds the first # 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 # abstract superclass of a controller, and gets a list of all public
# instance methods on that abstract class. Public instance methods of # instance methods on that abstract class. Public instance methods of