Merge pull request #2774 from evazion/fix-2771

Fix #2771: Approving deleted image doesn't create mod action.
This commit is contained in:
Albert Yi
2016-11-28 11:56:40 -08:00
committed by GitHub
2 changed files with 28 additions and 4 deletions

View File

@@ -327,6 +327,10 @@ class Post < ActiveRecord::Base
PostApproval.create(user_id: CurrentUser.id, post_id: id)
if is_deleted_was == true
ModAction.create(:description => "undeleted post ##{id}")
end
save!
end