lib/clockwork/database_events/manager.rb in clockwork-1.3.1 vs lib/clockwork/database_events/manager.rb in clockwork-2.0.0

- old
+ new

@@ -8,10 +8,14 @@ @events.delete(event) end def register(period, job, block, options) @events << if options[:from_database] - Clockwork::DatabaseEvents::Event.new(self, period, job, (block || handler), options.fetch(:synchronizer), options) + synchronizer = options.fetch(:synchronizer) + model_attributes = options.fetch(:model_attributes) + + Clockwork::DatabaseEvents::Event. + new(self, period, job, (block || handler), synchronizer, model_attributes, options) else Clockwork::Event.new(self, period, job, block || handler, options) end end end