title: cant use has_secure_password, password_digest error
body: <p>Good evening. I have a problem. i am using <code>has_secure_password</code>
  and cause of this i have an error <code>undefined method</code>password_digest=' for #`,</p>
  
  <p>but i dont have this method!! Please help, dont know what to do. I read how to fix this problem but it didnt help me(</p>
  
  <p>Here is my User model. Please help if you can.</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
  
    attr_accessible :email, :password, :password_confirmation
    has_secure_password
  
    validates_presence_of :password, :on =&gt; :create
  
    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>