Sha256: b376693c20fb97c377f0b861edebf899bf3eee4b3f56b0ff587a638476dadaf3
Contents?: true
Size: 371 Bytes
Versions: 12
Compression:
Stored size: 371 Bytes
Contents
module AhoyEmail class MessageSubscriber def track_click(event) message = AhoyEmail.message_model.find_by(token: event[:token]) if message message.clicked ||= true if message.respond_to?(:clicked=) message.clicked_at ||= Time.now if message.respond_to?(:clicked_at=) message.save! if message.changed? end end end end
Version data entries
12 entries across 12 versions & 1 rubygems