title: Override a Mongoid model's setters and getters
body: <p>Is there a way to override a setter or getter for a model in Mongoid?  Something like:</p>
  
  <pre><code>class Project
    include Mongoid::Document
    field :name, :type =&gt; String
    field :num_users, type: Integer, default: 0
    key :name
    has_and_belongs_to_many :users, class_name: "User", inverse_of: :projects
  
    # This will not work
    def name=(projectname)
      @name = projectname.capitalize
    end
  end
  </code></pre>
  
  <p>where the <code>name</code> method can be overwritten without using virtual fields?</p>