diff options
author | Yehuda Katz <wycats@gmail.com> | 2009-10-26 15:47:08 -0700 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2009-10-26 15:47:08 -0700 |
commit | 60cc86136bffc96bc62798538e08e0d28138d41c (patch) | |
tree | 9d5381f01c8ece005c05ea52061781aa49472660 /actionpack/lib/action_controller/metal/configuration.rb | |
parent | 55ae53baadf37daf2c966bf5d9d67c1f954cb681 (diff) | |
download | rails-60cc86136bffc96bc62798538e08e0d28138d41c.tar.gz rails-60cc86136bffc96bc62798538e08e0d28138d41c.tar.bz2 rails-60cc86136bffc96bc62798538e08e0d28138d41c.zip |
Base setup for config object in AC.
Diffstat (limited to 'actionpack/lib/action_controller/metal/configuration.rb')
-rw-r--r-- | actionpack/lib/action_controller/metal/configuration.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/metal/configuration.rb b/actionpack/lib/action_controller/metal/configuration.rb new file mode 100644 index 0000000000..5c829853b7 --- /dev/null +++ b/actionpack/lib/action_controller/metal/configuration.rb @@ -0,0 +1,28 @@ +module ActionController + module Configuration + extend ActiveSupport::Concern + + def config + @config ||= self.class.config + end + + def config=(config) + @config = config + end + + module ClassMethods + def default_config + @default_config ||= {} + end + + def config + self.config ||= default_config + end + + def config=(config) + @config = ActiveSupport::OrderedHash.new + @config.merge!(config) + end + end + end +end
\ No newline at end of file |