This commit is contained in:
Toks
2014-05-29 22:55:35 -04:00
parent 48b2719031
commit 71cd5ce783
11 changed files with 45 additions and 8 deletions

View File

@@ -29,8 +29,10 @@ class PostsController < ApplicationController
@post = Post.find(params[:id])
@post_flag = PostFlag.new(:post_id => @post.id)
@post_appeal = PostAppeal.new(:post_id => @post.id)
@parent_post_set = PostSets::PostRelationship.new(@post.parent_id, :include_deleted => @post.is_deleted? || (@post.parent_id.present? && @post.parent.is_deleted?))
@children_post_set = PostSets::PostRelationship.new(@post.id, :include_deleted => @post.is_deleted?)
include_deleted = @post.is_deleted? || (@post.parent_id.present? && @post.parent.is_deleted?) || CurrentUser.user.show_deleted_children?
@parent_post_set = PostSets::PostRelationship.new(@post.parent_id, :include_deleted => include_deleted)
@children_post_set = PostSets::PostRelationship.new(@post.id, :include_deleted => include_deleted)
respond_with(@post)
end