lib/eventsimple/event.rb in eventsimple-1.2.3 vs lib/eventsimple/event.rb in eventsimple-1.3.0
- old
+ new
@@ -88,10 +88,12 @@
def apply_and_persist
apply_timestamps(aggregate)
apply(aggregate)
# Persist!
+ aggregate.enable_writes!
aggregate.save!
+ aggregate.readonly!
self.aggregate = aggregate
end
def dispatch