From 786a3949fd2bcc987e3e691aa1c3e8817f89518c Mon Sep 17 00:00:00 2001 From: decabeza Date: Thu, 26 Jul 2018 17:13:45 +0200 Subject: [PATCH] Moves moderate_system_email from private method --- app/models/proposal_notification.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/models/proposal_notification.rb b/app/models/proposal_notification.rb index 2532f6c4c..37640b0e5 100644 --- a/app/models/proposal_notification.rb +++ b/app/models/proposal_notification.rb @@ -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