diff options
author | Carl Lerche <carllerche@mac.com> | 2010-03-03 19:45:08 -0800 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2010-03-03 21:24:27 -0800 |
commit | 1f0f05b10c924d2f0d0ff4c74cbd979e77deea1d (patch) | |
tree | 34121d202d4d176944b26d51aec84edaaecf0286 /actionpack/lib/abstract_controller/base.rb | |
parent | b160663bd13d08bf845bc8cdf87a2c5e7e46f901 (diff) | |
download | rails-1f0f05b10c924d2f0d0ff4c74cbd979e77deea1d.tar.gz rails-1f0f05b10c924d2f0d0ff4c74cbd979e77deea1d.tar.bz2 rails-1f0f05b10c924d2f0d0ff4c74cbd979e77deea1d.zip |
Move the original config method onto AbstractController
Diffstat (limited to 'actionpack/lib/abstract_controller/base.rb')
-rw-r--r-- | actionpack/lib/abstract_controller/base.rb | 8 |
1 files changed, 8 insertions, 0 deletions
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 |