diff options
| author | gitlabhq <m@gitlabhq.com> | 2011-10-09 00:36:38 +0300 |
|---|---|---|
| committer | gitlabhq <m@gitlabhq.com> | 2011-10-09 00:36:38 +0300 |
| commit | 9ba1224867665844b117fa037e1465bb706b3685 (patch) | |
| tree | 52fbfc1cdb55df21843965479c97be0c91121a9a /config/initializers/wrap_parameters.rb | |
| parent | 93efff945215a4407afcaf0cba15ac601b56df0d (diff) | |
| download | gitlab-ce-9ba1224867665844b117fa037e1465bb706b3685.tar.gz | |
init commit
Diffstat (limited to 'config/initializers/wrap_parameters.rb')
| -rw-r--r-- | config/initializers/wrap_parameters.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb new file mode 100644 index 00000000000..999df20181e --- /dev/null +++ b/config/initializers/wrap_parameters.rb @@ -0,0 +1,14 @@ +# Be sure to restart your server when you modify this file. +# +# This file contains settings for ActionController::ParamsWrapper which +# is enabled by default. + +# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. +ActiveSupport.on_load(:action_controller) do + wrap_parameters format: [:json] +end + +# Disable root element in JSON by default. +ActiveSupport.on_load(:active_record) do + self.include_root_in_json = false +end |
