title: has_secure_password is saving password in plain text
body: <p>I'm using Robert Reiz's guide <a href="http://robert-reiz.com/2014/04/12/has_secure_password-with-rails-4-1/" rel="nofollow">here</a> about using <code>has_secure_password</code> in Rails 4 to generate secure password hash's for a User model. I've generated the model and controllers, and the page works, I can submit the form in <code>new.html.erb</code> and it saves the data to the database and everything, <strong>but the password isn't hashed, it's just saved in plain text</strong>.</p>
  
  <p>Here is my User model (user.rb):</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
  
  has_secure_password
      EMAIL_REGEX = /\A[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\z/i
      validates :username, :presence =&gt; true, :uniqueness =&gt; true, :length =&gt; { :in =&gt; 3..20 }
      validates :email, :presence =&gt; true, :uniqueness =&gt; true, :format =&gt; EMAIL_REGEX
      validates :password, :length =&gt; { :minimum =&gt; 5 } 
      validates_confirmation_of :password
  end
  </code></pre>
  
  <p>If there are any other files you need to see, I'm happy to add them :)</p>
  
  <p>EDIT: Here is the migration file:</p>
  
  <pre><code>class CreateUsers &lt; ActiveRecord::Migration
  
  def change
      create_table :users do |t|
        t.string :username
        t.string :password_digest
        t.string :email
  
        t.timestamps null: false
      end
    end
  end
  </code></pre>