Remove name conflict change which caused PaperTrail to fail

This commit is contained in:
CactusPuppy 2021-04-07 22:48:57 -07:00
parent ce90dc5fc2
commit 29804c8681
No known key found for this signature in database
GPG key ID: 4B33B0A3E15E2C82
2 changed files with 18 additions and 18 deletions

View file

@ -88,8 +88,8 @@ class User < ApplicationRecord
# we must resort to using a ActiveRecord::Concern which accumulates
# 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' }
after_update_commit :mailbluster_update_email, if: ->(obj){ obj.ts_saved_changes.key? 'email' }
after_update_commit :mailbluster_update_name, if: ->(obj){ obj.ts_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)}