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

- old
+ new

@@ -39,12 +39,11 @@ self.track_method = lambda do |data| message = data[:message] ahoy_message = AhoyEmail.message_model.new ahoy_message.to = Array(message.to).join(", ") if ahoy_message.respond_to?(:to=) - ahoy_message.user_type = data[:user_type] - ahoy_message.user_id = data[:user_id] + ahoy_message.user = data[:user] ahoy_message.mailer = data[:mailer] if ahoy_message.respond_to?(:mailer=) ahoy_message.subject = message.subject if ahoy_message.respond_to?(:subject=) ahoy_message.content = message.encoded if ahoy_message.respond_to?(:content=) @@ -74,7 +73,7 @@ end ActiveSupport.on_load(:action_mailer) do include AhoyEmail::Mailer register_observer AhoyEmail::Observer - Mail::Message.attr_accessor :ahoy_data, :ahoy_message + Mail::Message.send(:attr_accessor, :ahoy_data, :ahoy_message) end