lib/mongo_mapper/plugins/timestamps.rb in mongo_mapper-0.10.1 vs lib/mongo_mapper/plugins/timestamps.rb in mongo_mapper-0.11.0

- old
+ new

@@ -10,15 +10,13 @@ key :updated_at, Time class_eval { before_save :update_timestamps } end end - module InstanceMethods - def update_timestamps - now = Time.now.utc - self[:created_at] = now if !persisted? && !created_at? - self[:updated_at] = now - end + def update_timestamps + now = Time.now.utc + self[:created_at] = now if !persisted? && !created_at? + self[:updated_at] = now end end end end \ No newline at end of file