Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Using new hash syntax in wrap_parameters initializer under Ruby 1.9

  • Loading branch information...
commit e987bc5469f5dc7da1c20f5c6acb51cf4af3b11c 1 parent e2c4282
@guilleiguaran guilleiguaran authored
2  railties/lib/rails/generators/rails/app/templates/config/initializers/
@@ -4,7 +4,7 @@
# which will be enabled by default in the upcoming version of Ruby on Rails.
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
-ActionController::Base.wrap_parameters :format => [:json]
+ActionController::Base.wrap_parameters <%= key_value :format, "[:json]" %>
# Disable root element in JSON by default.
if defined?(ActiveRecord)
Please sign in to comment.
Something went wrong with that request. Please try again.