From d3e91e8290a1b5f4504c2c0fdba626922618281f Mon Sep 17 00:00:00 2001 From: albert Date: Sat, 23 Feb 2013 20:59:00 -0500 Subject: [PATCH] fixes #599 --- app/controllers/comments_controller.rb | 1 + app/views/comments/index_by_post.html.erb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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| %>
<%= link_to(image_tag(post.preview_file_url), post_path(post)) %>