title: Rails - ArgumentError in UsersController#create - too few arguments
body: <p>This is probably really basic but I can't seem to figure it out.</p>
  
  <p>Essentially, when I try to create a new user using a form, and the user details are already present and not unique, I receive he following error:</p>
  
  <pre><code>ArgumentError in UsersController#create
  
  too few arguments
  
  Application Trace | Framework Trace | Full Trace
  app/controllers/users_controller.rb:61:in `format'
  app/controllers/users_controller.rb:61:in `create'
  </code></pre>
  
  <p>Here's my <code>create</code> action in my <code>user_controller.rb</code>:</p>
  
  <pre><code>  # POST /users
    # POST /users.xml
    def create
        @user = User.new(params[:user])
  
          if @user.save
            flash[:notice] = 'User successfully created' and redirect_to :action=&gt;"index"
          else
            format.html { render :action =&gt; "new" }
            format.xml  { render :xml =&gt; @user.errors, :status =&gt; :unprocessable_entity }
          end
        end
      end
  </code></pre>
  
  <p>And here's my <code>user.rb</code></p>
  
  <pre><code>class User &lt; ActiveRecord::Base
    # Include default devise modules. Others available are:
    # :token_authenticatable, :confirmable,
    # :lockable, :timeoutable and :omniauthable
    devise :database_authenticatable,
           :recoverable, :rememberable, :trackable, :validatable
  
    # Setup accessible (or protected) attributes for your model
    attr_accessible :email, :username, :password, :password_confirmation, :remember_me
  
    validates :email, :username, :presence =&gt; true, :uniqueness =&gt; true
  end
  </code></pre>
  
  <p>Here's also my form:</p>
  
  <pre><code>&lt;%= simple_form_for(@user) do |f| %&gt;
    &lt;div class="field"&gt;
      &lt;%= f.input :username %&gt;
    &lt;/div&gt;
    &lt;div class="field"&gt;
      &lt;%= f.input :email %&gt;
    &lt;/div&gt;
      &lt;div class="field"&gt;
        &lt;%= f.input :password %&gt;
      &lt;/div&gt;
      &lt;div class="field"&gt;
        &lt;%= f.input :password_confirmation %&gt;
      &lt;/div&gt;
    &lt;div class="actions"&gt;
      &lt;%= f.button :submit %&gt;
    &lt;/div&gt;
  &lt;% end %&gt;
  </code></pre>