title: How to update only part of attributes, not all, in rails
body: <p>I have an edit form for updating some attributes. But it tryes to edit all attributes, and cause of this I have validation error. </p>
  
  <p>My form (edit view)</p>
  
  <pre><code>#person_info.fl_l
    - if @user.errors.any?
      .error_explanation
        %h2 Form is invalid
        %ul
          -for message in  @user.errors.full_messages
            %li= message
  
  
    =form_for @user do |f|
      %p
        Birthday:
        %br
        = f.date_select(:birthday,:start_year =&gt; 1940)
      %p
        Name:
        %br
        = f.text_field :name, :value=&gt;@user.name
      %p
        Surname:
        %br
        = f.text_field :surname, :value=&gt;@user.surname
      %p
        Nickname:
        %br
        = f.text_field :nickname, :value=&gt;@user.surname       
      %p
        About Myself:
        %br
        = f.text_area :about_myself, :value=&gt;@user.about_myself
      %p
        = f.submit "Update"
  </code></pre>
  
  <p>My update and edit actions:</p>
  
  <pre><code>def edit
        @user = User.find(params[:id])
    end
  
    def update
      @user = User.find(params[:id])
      if @user.update_attributes(params[:user])
        redirect_to @user
      else
        render 'edit'
      end
    end
  </code></pre>
  
  <p>When I submit the form, it outputs validation errors like: "Password can't be blank"</p>
  
  <p>So, how to update only part of attributes, not all? I dont want to update password in my case.</p>
  
  <p>My user model</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
  
    has_many :posts
    has_many :sent_messages, :class_name =&gt; "Message", :foreign_key =&gt; "sender_id"
    has_many :received_messages, :class_name =&gt; "Message", :foreign_key =&gt; "receiver_id"
    attr_accessible :name, :email, :password, :password_confirmation
    has_secure_password
    email_regex = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
  
    validates :name, :presence =&gt; true,
              :length =&gt; {:maximum =&gt; 50}
    validates :email, :presence =&gt; true,
              :format =&gt; {:with =&gt; email_regex},
              :uniqueness =&gt; {:case_sensitive =&gt; false}
  
    validates :password, :presence =&gt; true,
              :confirmation =&gt; true,
              :length =&gt; {:within =&gt; 6..40}
  
  
    before_create { generate_token(:auth_token) }
  
    def send_password_reset
      generate_token(:password_reset_token)
      self.password_reset_sent_at = Time.zone.now
      save!
      UserMailer.password_reset(self).deliver
    end
  
    def generate_token(column)
      begin
        self[column] = SecureRandom.urlsafe_base64
      end while User.exists?(column =&gt; self[column])
    end
  end
  </code></pre>