aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/configuration.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/configuration.rb')
-rw-r--r--railties/lib/rails/configuration.rb14
1 files changed, 9 insertions, 5 deletions
diff --git a/railties/lib/rails/configuration.rb b/railties/lib/rails/configuration.rb
index 0a545f23de..2b847ba711 100644
--- a/railties/lib/rails/configuration.rb
+++ b/railties/lib/rails/configuration.rb
@@ -278,12 +278,16 @@ module Rails
end
def method_missing(method, *args)
- method = method.to_s.sub(/=$/, '').to_sym
- namespace = args.first.is_a?(Symbol) ? args.shift : nil
- configuration = args.first.is_a?(Hash) ? args.shift : nil
+ method = method.to_s.sub(/=$/, '').to_sym
- @options[:rails][method] = namespace if namespace
- namespace ||= method
+ if method == :rails
+ namespace, configuration = :rails, args.shift
+ elsif args.first.is_a?(Hash)
+ namespace, configuration = method, args.shift
+ else
+ namespace, configuration = args.shift, args.shift
+ @options[:rails][method] = namespace
+ end
if configuration
aliases = configuration.delete(:aliases)