Allow post disapprovals to be edited

This commit is contained in:
nonamethanks
2022-04-11 20:48:10 +02:00
parent 05261bf6d7
commit 1a990d5ab9
11 changed files with 76 additions and 19 deletions

View File

@@ -38,6 +38,10 @@ class PostsController < ApplicationController
@child_posts = @post.children
@child_posts = @child_posts.undeleted unless include_deleted
@sibling_posts = @sibling_posts.includes(:media_asset)
if CurrentUser.user.is_approver?
@previous_disapproval = @post.disapprovals.select { |disapproval| disapproval.user_id == CurrentUser.user.id }.first
end
end
respond_with(@post) do |format|