app/models/unidom/contact/contact_subscription.rb in unidom-contact-0.3 vs app/models/unidom/contact/contact_subscription.rb in unidom-contact-0.3.1
- old
+ new
@@ -14,10 +14,10 @@
scope :contact_is, ->(contact) { where contact: contact }
scope :subscribed_by, ->(subscriber) { where subscriber: subscriber }
include Unidom::Common::Concerns::ModelExtension
- def self.subscribe(contact, subscriber, name: subscriber.name, primary: false, grade: 0, priority: 0)
- contact_is(contact).subscribed_by(subscriber).valid_at.alive.first_or_create name: name, elemental: primary, grade: grade, priority: priority, opened_at: Time.now
+ def self.subscribe(contact, subscriber, name: subscriber.name, primary: false, grade: 0, priority: 0, opened_at: Time.now)
+ contact_is(contact).subscribed_by(subscriber).valid_at.alive.first_or_create name: name, elemental: primary, grade: grade, priority: priority, opened_at: opened_at
end
end