lib/weasel/concerns/auditable.rb in weasel-0.2.3 vs lib/weasel/concerns/auditable.rb in weasel-0.2.4

- old
+ new

@@ -3,14 +3,16 @@ around_filter :audit, only: args end module Auditable def audit - yield + begin + yield + ensure + return unless actor.present? - return unless actor.present? - - Weasel::EventsWorker.perform_async(actor.class.name, actor.id, request_data) + Weasel::EventsWorker.perform_async(actor.class.name, actor.id, request_data) + end end private def actor