Moves moderate_system_email from private method

This commit is contained in:
decabeza
2018-07-26 17:13:45 +02:00
parent 9d580e15f5
commit 786a3949fd

View File

@@ -38,6 +38,11 @@ class ProposalNotification < ActiveRecord::Base
proposal proposal
end end
def moderate_system_email(moderator)
Notification.where(notifiable_type: 'ProposalNotification', notifiable: self).destroy_all
Activity.log(moderator, :hide, self)
end
def ignore_flag def ignore_flag
update(ignored_at: Time.current) update(ignored_at: Time.current)
end end
@@ -56,9 +61,4 @@ class ProposalNotification < ActiveRecord::Base
self.update(author_id: self.proposal.author_id) if self.proposal self.update(author_id: self.proposal.author_id) if self.proposal
end end
def moderate_system_email(moderator)
Notification.where(notifiable_type: 'ProposalNotification', notifiable: self).destroy_all
Activity.log(moderator, :hide, self)
end
end end