Fix restore notifications from admins page

The restore feature was not working properly. When pushed, the button
was removing the notification from the admins panel, but it was not
restoring in the proposal.

I added an `after_restore` function (that I missed in the first PR)
so that the notification is unmarked as moderated.
This commit is contained in:
iagirre
2018-05-30 16:02:37 +02:00
committed by decabeza
parent 0fb7d13229
commit 894c5d1eca
2 changed files with 5 additions and 0 deletions

View File

@@ -45,6 +45,10 @@ class ProposalNotification < ActiveRecord::Base
ignored_at.present?
end
def after_restore
update(moderated: false)
end
private
def set_author