310b8ad4e9
The detection logic wasn't really working before
23 lines
392 B
Ruby
23 lines
392 B
Ruby
module Comment::Eventable
|
|
extend ActiveSupport::Concern
|
|
|
|
include ::Eventable
|
|
|
|
included do
|
|
after_create_commit :track_creation
|
|
end
|
|
|
|
def event_was_created(event)
|
|
card.touch_last_active_at
|
|
end
|
|
|
|
private
|
|
def should_track_event?
|
|
!creator.system?
|
|
end
|
|
|
|
def track_creation
|
|
track_event("created", collection: card.collection, creator: creator)
|
|
end
|
|
end
|