title: Updating `User` attributes without requiring password
body: <p>Right now, users can edit some their attributes without having to enter their password because my validations are set up like this:  </p>
  
  <pre><code>validates :password, :presence =&gt;true, :confirmation =&gt; true, :length =&gt; { :within =&gt; 6..40 }, :on =&gt; :create
  validates :password, :confirmation =&gt; true, :length =&gt; { :within =&gt; 6..40 }, :on =&gt; :update, :unless =&gt; lambda{ |user| user.password.blank? } 
  </code></pre>
  
  <p>However, after a user does this, their password is deleted - update_attributes is updating their password to "".  Here is my update definition:  </p>
  
  <pre><code>def update
  
      if @user.update_attributes(params[:user])
          flash[:success] = "Edit Successful."
          redirect_to @user
      else
          @title = "Edit user"
          render 'edit'
      end
  end
  </code></pre>
  
  <p>I've also tried using a different definition that uses update_attribute instead: </p>
  
  <pre><code>def save_ff
      @user = User.find(params[:id])
      @user.update_attribute(:course1, params[:user][:course1] )
      @user.update_attribute(:course2, params[:user][:course2] )
      @user.update_attribute(:course3, params[:user][:course3] )
      @user.update_attribute(:course4, params[:user][:course4] )
      redirect_to @user 
  end 
  </code></pre>
  
  <p>But for some reason this is doing the same thing. How can I update some user attributes without changing the password?  Thanks!</p>