Is there a way to override a setter or getter for a model in Mongoid? Something like:
class Project include Mongoid::Document field :name, :type => Strin
better use
def name=(projectname) super(projectname.capitalize) end
the method
self[:name] = projectname.capitalize
can be dangerous, cause overloading with it can cause endless recursion