Skip to content
This repository
Browse code

Using new hash syntax in wrap_parameters initializer under Ruby 1.9

  • Loading branch information...
commit e987bc5469f5dc7da1c20f5c6acb51cf4af3b11c 1 parent e2c4282
Guillermo Iguaran authored
2  railties/lib/rails/generators/rails/app/templates/config/initializers/wrap_parameters.rb.tt
@@ -4,7 +4,7 @@
4 4
 # which will be enabled by default in the upcoming version of Ruby on Rails.
5 5
 
6 6
 # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7  
-ActionController::Base.wrap_parameters :format => [:json]
  7
+ActionController::Base.wrap_parameters <%= key_value :format, "[:json]" %>
8 8
 
9 9
 # Disable root element in JSON by default.
10 10
 if defined?(ActiveRecord)

0 notes on commit e987bc5

Please sign in to comment.
Something went wrong with that request. Please try again.