lib/mongomodel/concerns/attributes.rb in mongomodel-0.4.2 vs lib/mongomodel/concerns/attributes.rb in mongomodel-0.4.3

- old
+ new

@@ -2,11 +2,11 @@ module MongoModel module Attributes extend ActiveSupport::Concern - def initialize(attrs={}) - self.attributes = (attrs || {}) + def initialize(attrs={}, options={}) + assign_attributes(attrs || {}, options) yield self if block_given? end def attributes @attributes ||= Attributes::Store.new(self)