lib/ahoy_email.rb in ahoy_email-0.4.0 vs lib/ahoy_email.rb in ahoy_email-0.5.0

- old
+ new

@@ -9,11 +9,11 @@ require "ahoy_email/interceptor" require "ahoy_email/mailer" require "ahoy_email/engine" module AhoyEmail - mattr_accessor :secret_token, :options, :subscribers, :belongs_to + mattr_accessor :secret_token, :options, :subscribers, :belongs_to, :invalid_redirect_url self.options = { message: true, open: true, click: true, @@ -39,10 +39,10 @@ class << self attr_writer :message_model end def self.message_model - @message_model || Ahoy::Message + (defined?(@message_model) && @message_model) || ::Ahoy::Message end end ActionMailer::Base.send :include, AhoyEmail::Mailer ActionMailer::Base.register_interceptor AhoyEmail::Interceptor