spec/support/mongo_mapper/models.rb in audited-4.0.0.rc1 vs spec/support/mongo_mapper/models.rb in audited-4.0.0
- old
+ new
@@ -92,13 +92,17 @@
key :suspended_at, Time
key :logins, Integer, :default => 0
timestamps!
audited
- attr_accessor :bogus_attr
+ attr_accessor :bogus_attr, :around_attr
def after_audit
self.bogus_attr = "do something"
+ end
+
+ def around_audit
+ self.around_attr = yield
end
end
class Company
include ::MongoMapper::Document