Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Do not enable wrap_parameters

This commit doesn't add anything since before it wrap_parameters was
overriden to do nothing.

Closes #33
  • Loading branch information...
commit 57c3bf27075a4d1a83ab50dd3dc31ce24916e0b8 1 parent cdd2aac
@spastorino spastorino authored
1  lib/rails-api/action_controller/api.rb
@@ -95,7 +95,6 @@ def asset_path=(*); end
def asset_host=(*); end
def relative_url_root=(*); end
def perform_caching=(*); end
- def wrap_parameters(*); end
def helpers_path=(*); end
def allow_forgery_protection=(*); end
def helper_method(*); end
16 lib/rails-api/templates/rails/app/config/initializers/
@@ -0,0 +1,16 @@
+# 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] if respond_to?(:wrap_parameters)
+# end
+<%- unless options.skip_active_record? -%>
+# To enable root element in JSON for ActiveRecord objects.
+# ActiveSupport.on_load(:active_record) do
+# self.include_root_in_json = true
+# end
+<%- end -%>
Please sign in to comment.
Something went wrong with that request. Please try again.