title: Why is `before_save` not working in Rails 4?
body: <p>When I try <code>u = User.new</code> followed by <code>u.save</code>, the <code>before_save</code> method is not being fired.</p>
  
  <p>Here's my <code>User</code> model:</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
    attr_accessor :password
    before_save :encrypt_password
  
    def encrypt_password
      puts "Its getting called"
    end
  end
  </code></pre>
  
  <p><a href="https://railsforum.com/topic/1741-rails-4-and-before-save-method/">https://railsforum.com/topic/1741-rails-4-and-before-save-method/</a></p>