FIX: non-logged in users couldn't see who liked something

This commit is contained in:
Robin Ward 2013-04-08 11:57:23 -04:00
parent 8942d9a094
commit 4ad006ea97

View file

@ -72,7 +72,7 @@ class PostActionsController < ApplicationController
finder = Post.where(id: params[:id])
# Include deleted posts if the user is a moderator (to guardian ?)
finder = finder.with_deleted if current_user.moderator?
finder = finder.with_deleted if current_user.try(:moderator?)
@post = finder.first
guardian.ensure_can_see!(@post)