diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-08-16 00:59:59 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-08-16 00:59:59 +0100 |
commit | 6c5f67cac15c43bafcd917c346cccfcf3fa5fb95 (patch) | |
tree | 6932752930fcc50e6799024b32d6dbc4bdd7670b /railties | |
parent | 03a045b306768e12bb0f1480040aa9e93e8d6338 (diff) | |
download | rails-6c5f67cac15c43bafcd917c346cccfcf3fa5fb95.tar.gz rails-6c5f67cac15c43bafcd917c346cccfcf3fa5fb95.tar.bz2 rails-6c5f67cac15c43bafcd917c346cccfcf3fa5fb95.zip |
Don't refer to ActionController::Base in the wrap_parameters initializer - use config object instead. Cuts about 15% off the load time. (#734)
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/config/initializers/wrap_parameters.rb.tt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/config/initializers/wrap_parameters.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/initializers/wrap_parameters.rb.tt index fa1548db8b..45c7e531ba 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/initializers/wrap_parameters.rb.tt +++ b/railties/lib/rails/generators/rails/app/templates/config/initializers/wrap_parameters.rb.tt @@ -4,7 +4,7 @@ # is enabled by default. # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. -ActionController::Base.wrap_parameters <%= key_value :format, "[:json]" %> +<%= app_const %>.config.wrap_parameters <%= key_value :format, "[:json]" %> # Disable root element in JSON by default. if defined?(ActiveRecord) |