lib/ahoy_email.rb in ahoy_email-1.1.0 vs lib/ahoy_email.rb in ahoy_email-1.1.1

- old
+ new

@@ -27,10 +27,10 @@ utm_source: -> { mailer_name }, utm_medium: "email", utm_term: nil, utm_content: nil, utm_campaign: -> { action_name }, - user: -> { @user || (respond_to?(:params) && params && params[:user]) || (message.to.try(:size) == 1 ? (User.find_by(email: message.to.first) rescue nil) : nil) }, + user: -> { (defined?(@user) && @user) || (respond_to?(:params) && params && params[:user]) || (message.to.try(:size) == 1 ? (User.find_by(email: message.to.first) rescue nil) : nil) }, mailer: -> { "#{self.class.name}##{action_name}" }, url_options: {}, extra: {}, unsubscribe_links: false }