title: Ruby on Rails: before_save fields to lowercase
body: <p>I'm trying to change the fields from the form to lower case before they get saved in the database. This is my code but the output from the database is still in upper case why isnt the code working?  </p>
  
  <pre><code>class Transaction &lt; ActiveRecord::Base
     validates :name, presence: true
     validates :amount, presence: true, numericality: true
     before_save :downcase_fields
  
     def downcase_fields
        self.name.downcase
     end
  end
  </code></pre>