diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index 833073da2..d01d1c478 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -68,6 +68,7 @@ private def index_by_post @posts = Post.commented_before(Time.now).tag_match(params[:tags]).paginate(params[:page], :limit => 5, :search_count => params[:search]) + @posts.all respond_with(@posts) do |format| format.html {render :action => "index_by_post"} end diff --git a/app/views/comments/index_by_post.html.erb b/app/views/comments/index_by_post.html.erb index 730db3948..378757712 100644 --- a/app/views/comments/index_by_post.html.erb +++ b/app/views/comments/index_by_post.html.erb @@ -6,7 +6,7 @@ <%= render "post_sets/blank" %> <% end %> - <% @posts.each do |post| %> + <% @posts.select {|x| Danbooru.config.can_user_see_post?(CurrentUser.user, x)}.each do |post| %>