In a standard Rails controller, I\'d create a record like this:
@user = User.new(params[:user])
This assumes that the form parameters that come
As of Rails 3.1 there's now a new initializer called wrap_parameters.rb which handles this problem by default. The code that handle this case is:
wrap_parameters.rb
# Disable root element in JSON by default. ActiveSupport.on_load(:active_record) do self.include_root_in_json = false end
Bada bing!