lib/ahoy_email.rb in ahoy_email-1.0.0 vs lib/ahoy_email.rb in ahoy_email-1.0.1

- old
+ new

@@ -6,11 +6,11 @@ require "safely/core" # modules require "ahoy_email/processor" require "ahoy_email/tracker" -require "ahoy_email/interceptor" +require "ahoy_email/observer" require "ahoy_email/mailer" require "ahoy_email/version" require "ahoy_email/engine" if defined?(Rails) module AhoyEmail @@ -56,10 +56,12 @@ ahoy_message.assign_attributes(data[:extra] || {}) ahoy_message.sent_at = Time.now ahoy_message.save! + + ahoy_message end self.subscribers = [] self.preserve_callbacks = [] @@ -71,7 +73,8 @@ end end ActiveSupport.on_load(:action_mailer) do include AhoyEmail::Mailer - register_interceptor AhoyEmail::Interceptor + register_observer AhoyEmail::Observer + Mail::Message.attr_accessor :ahoy_data, :ahoy_message end