Use mongoid write_attribute method instead of attribute= method to support dynamic fields


Using attribute= requires that the attribute be pre-defined in the model. Mongoid supports dynamic fields, http://mongoid.org/en/mongoid/docs/documents.html#dynamic_fields, however this functionality cannot be taken advantage of with the attribute= method.