test/dummy/config/initializers/wrap_parameters.rb in html5-rails-0.0.2 vs test/dummy/config/initializers/wrap_parameters.rb in html5-rails-0.0.3

- old
+ new

@@ -2,11 +2,13 @@ # # 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. -ActionController::Base.wrap_parameters format: [:json] +ActiveSupport.on_load(:action_controller) do + wrap_parameters format: [:json] +end # Disable root element in JSON by default. -if defined?(ActiveRecord) - ActiveRecord::Base.include_root_in_json = false +ActiveSupport.on_load(:active_record) do + self.include_root_in_json = false end