title: Custom method in Registrations controller with Devise
body: <p>I have a defined User and I want to be able to let him confirm his account be reentering his email and names (because those have been filled by a third party).  So here is what I have:</p>
  
  <pre><code>def confirm_account
      if request.get?
        self.resource = resource_class.to_adapter.get!(send(:"current_#{resource_name}").to_key)
      elsif request.put?
        self.resource = build_resource(resource_params)
        if self.resource.save 
        else
          respond_with resource
        end
      end
    end
  </code></pre>
  
  <p>And in my template I have:</p>
  
  <pre><code>&lt;%= simple_form_for(resource, :as =&gt; resource_name, :url =&gt; confirm_account_path(resource_name), :html =&gt; { :method =&gt; :put, :autocomplete =&gt; "off", :class =&gt; 'form-vertical' }) do |f| %&gt;
    &lt;%= devise_error_messages! %&gt;
      &lt;h1&gt; Create your Account &lt;/h1&gt;
      &lt;%= f.input :first_name, :label =&gt; "First Name" %&gt;
      &lt;%= f.input :last_name, :label =&gt; "Last Name" %&gt;
      &lt;%= f.input :email, :label =&gt; "Email add." %&gt;
    &lt;p&gt;
      &lt;%= f.button :submit, "Create account" %&gt;
    &lt;/p&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>However, when I click on the Submit button, I see in the logs the following:</p>
  
  <pre><code>   (0.3ms)  BEGIN
    User Exists (0.5ms)  SELECT 1 AS one FROM "users" WHERE "users"."email" = 'myemail@gmail.com' LIMIT 1
     (0.3ms)  ROLLBACK
  Completed 406 Not Acceptable in 5ms (ActiveRecord: 1.1ms)
  </code></pre>
  
  <p>Why is not letting me try to update the user?</p>
  
  <p>Thanks</p>