lib/ahoy_email.rb in ahoy_email-0.5.1 vs lib/ahoy_email.rb in ahoy_email-0.5.2
- old
+ new
@@ -15,17 +15,18 @@
self.options = {
message: true,
open: true,
click: true,
utm_params: true,
- utm_source: proc { |message, mailer| mailer.mailer_name },
+ utm_source: ->(message, mailer) { mailer.mailer_name },
utm_medium: "email",
utm_term: nil,
utm_content: nil,
- utm_campaign: proc { |message, mailer| mailer.action_name },
- user: proc { |message, mailer| (message.to.size == 1 ? User.where(email: message.to.first).first : nil) rescue nil },
- mailer: proc { |message, mailer| "#{mailer.class.name}##{mailer.action_name}" },
- url_options: {}
+ utm_campaign: ->(message, mailer) { mailer.action_name },
+ user: ->(message, mailer) { (message.to.size == 1 ? User.where(email: message.to.first).first : nil) rescue nil },
+ mailer: ->(message, mailer) { "#{mailer.class.name}##{mailer.action_name}" },
+ url_options: {},
+ heuristic_parse: false
}
self.subscribers = []
self.belongs_to = {}