Class: AhoyEmail::MessageSubscriber
- Inherits:
-
Object
- Object
- AhoyEmail::MessageSubscriber
- Defined in:
- lib/ahoy_email/message_subscriber.rb
Instance Method Summary collapse
Instance Method Details
#track_click(event) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/ahoy_email/message_subscriber.rb', line 3 def track_click(event) = AhoyEmail..find_by(token: event[:token]) if .clicked ||= true if .respond_to?(:clicked=) .clicked_at ||= Time.now if .respond_to?(:clicked_at=) .save! if .changed? end end |