find_or_create_next_summary -> find_or_create_active_summary

This commit is contained in:
Jose Farias
2024-10-27 12:36:37 -06:00
parent 4cd5dc0b35
commit f782b43ef5
+2 -2
View File
@@ -11,11 +11,11 @@ module Bubble::Eventable
private
def track_event(action, creator: Current.user, **particulars)
transaction do
find_or_create_next_summary.events << Event.new(action: action, creator: creator, particulars: particulars)
find_or_create_active_summary.events << Event.new(action: action, creator: creator, particulars: particulars)
end
end
def find_or_create_next_summary
def find_or_create_active_summary
messages.last&.event_summary || capture(event_summaries.build).messageable
end
end