Moves moderate_system_email from private method
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user