Prepare to add Mailbluster update name
This commit is contained in:
parent
66c2728998
commit
d6341ff932
1 changed files with 5 additions and 0 deletions
|
|
@ -88,6 +88,7 @@ class User < ApplicationRecord
|
|||
# changes from a commit (app/models/concerns/track_saved_changes.rb)
|
||||
# See https://github.com/ccmcbeck/after-commit
|
||||
after_update_commit :mailbluster_update_email, if: ->(obj){ obj.saved_changes.key? 'email' }
|
||||
after_update_commit :mailbluster_update_name, if: ->(obj){ obj.saved_changes.key? 'name' }
|
||||
|
||||
# add scope
|
||||
scope :comment_notifiable, ->(conference) {joins(:roles).where('roles.name IN (?)', [:organizer, :cfp]).where('roles.resource_type = ? AND roles.resource_id = ?', 'Conference', conference.id)}
|
||||
|
|
@ -394,6 +395,10 @@ class User < ApplicationRecord
|
|||
MailblusterEditLeadJob.perform_later(self, old_email: saved_changes['email'][0])
|
||||
end
|
||||
|
||||
def mailbluster_update_name
|
||||
# TODO
|
||||
end
|
||||
|
||||
def touch_events
|
||||
event_users.each(&:touch)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue