diff options
Diffstat (limited to 'railties/lib/rails/application/configuration.rb')
-rw-r--r-- | railties/lib/rails/application/configuration.rb | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index 782bc4b0f1..9a6a4a52c7 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -155,15 +155,21 @@ module Rails def annotations SourceAnnotationExtractor::Annotation end - + private - class Custom + class Custom #:nodoc: def initialize @configurations = Hash.new end - + def method_missing(method, *args) - @configurations[method] ||= ActiveSupport::OrderedOptions.new + if method =~ /=$/ + @configurations[$`.to_sym] = args.first + else + @configurations.fetch(method) { + @configurations[method] = ActiveSupport::OrderedOptions.new + } + end end end end |