diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2014-08-03 15:48:14 -0700 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2014-08-03 15:48:14 -0700 |
commit | 611849772dd66c2e4d005dcfe153f7ce79a8a7db (patch) | |
tree | 11ea0257ad55a967bb749fd440530836c86ae066 /railties/lib/rails/application | |
parent | e5632f37f797fd3cc6e2f793d7c73e97a55a8d73 (diff) | |
download | rails-611849772dd66c2e4d005dcfe153f7ce79a8a7db.tar.gz rails-611849772dd66c2e4d005dcfe153f7ce79a8a7db.tar.bz2 rails-611849772dd66c2e4d005dcfe153f7ce79a8a7db.zip |
Pull in the custom configuration concept from dhh/custom_configuration
Diffstat (limited to 'railties/lib/rails/application')
-rw-r--r-- | railties/lib/rails/application/configuration.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index 5e8f4de847..782bc4b0f1 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -13,7 +13,7 @@ module Rails :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_assets, :ssl_options, :static_cache_control, :session_options, :time_zone, :reload_classes_only_on_change, - :beginning_of_week, :filter_redirect + :beginning_of_week, :filter_redirect, :x attr_writer :log_level attr_reader :encoding @@ -48,6 +48,7 @@ module Rails @eager_load = nil @secret_token = nil @secret_key_base = nil + @x = Custom.new @assets = ActiveSupport::OrderedOptions.new @assets.enabled = true @@ -154,6 +155,17 @@ module Rails def annotations SourceAnnotationExtractor::Annotation end + + private + class Custom + def initialize + @configurations = Hash.new + end + + def method_missing(method, *args) + @configurations[method] ||= ActiveSupport::OrderedOptions.new + end + end end end end |