lib/purgatory/purgatory.rb in purgatory-6.0.2 vs lib/purgatory/purgatory.rb in purgatory-6.0.3

- old
+ new

@@ -14,11 +14,11 @@ serialize :performable_method def self.pending where(approved_at: nil) end - + def self.approved where ["approved_at IS NOT NULL"] end def approved? @@ -49,9 +49,10 @@ success = nil self.with_lock do unless approved? success = soul_with_changes.save if performable_method.present? && success + performable_method[:kwargs] ||= {} success = soul.send(performable_method[:method], *performable_method[:args], **performable_method[:kwargs]) end if success self.approver = approver