2016-12-16 21:51:52 +00:00
|
|
|
# frozen_string_literal: true
|
2017-11-25 19:23:47 +00:00
|
|
|
|
2017-01-24 00:30:13 +00:00
|
|
|
module Events
|
|
|
|
class SynapseUpdated < Event
|
|
|
|
# after_create :notify_users!
|
2016-12-16 21:51:52 +00:00
|
|
|
|
2017-01-24 00:30:13 +00:00
|
|
|
def self.publish!(synapse, user, meta)
|
|
|
|
create!(kind: 'synapse_updated',
|
|
|
|
eventable: synapse,
|
|
|
|
user: user,
|
|
|
|
meta: meta)
|
|
|
|
end
|
2016-12-16 21:51:52 +00:00
|
|
|
end
|
|
|
|
end
|