Moves moderate_system_email from private method
This commit is contained in:
@@ -38,6 +38,11 @@ class ProposalNotification < ActiveRecord::Base
|
||||
proposal
|
||||
end
|
||||
|
||||
def moderate_system_email(moderator)
|
||||
Notification.where(notifiable_type: 'ProposalNotification', notifiable: self).destroy_all
|
||||
Activity.log(moderator, :hide, self)
|
||||
end
|
||||
|
||||
def ignore_flag
|
||||
update(ignored_at: Time.current)
|
||||
end
|
||||
@@ -56,9 +61,4 @@ class ProposalNotification < ActiveRecord::Base
|
||||
self.update(author_id: self.proposal.author_id) if self.proposal
|
||||
end
|
||||
|
||||
def moderate_system_email(moderator)
|
||||
Notification.where(notifiable_type: 'ProposalNotification', notifiable: self).destroy_all
|
||||
Activity.log(moderator, :hide, self)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user