title: Devise + Rails 4.1 JSON API: user parameters are not wrapped
body: <p>I am using Rails 4.1 to build a JSON api with authentication based on Devise. Parameters wrapping is working just fine for my models/controllers using the following config in <code>config/initializers/wrap_parameters.rb</code>:</p>
  
  <pre><code>ActiveSupport.on_load(:action_controller) do
    wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
  end
  </code></pre>
  
  <p>But the wrapping is not working for devise controllers. When I post a non rooted json to the devise controllers I get a <code>422</code> code.</p>
  
  <p>Any idea how to enable parameter wrapping for devise controllers?</p>
  
  <p>EDIT:</p>
  
  <p>Devise expects the user data to be rooted in the <code>user</code> key as follows:</p>
  
  <pre><code>{ user: { email: "..", password: ".." } }
  </code></pre>
  
  <p>Whereas with parameter wrapping, I would expect the following json to work:</p>
  
  <pre><code>{ email: "..", password: ".." }
  </code></pre>