From bf281df02388624798bf647966f8252d937d2f40 Mon Sep 17 00:00:00 2001 From: evazion Date: Tue, 25 Feb 2020 13:41:14 -0600 Subject: [PATCH] forum post votes: fix broken visible check. --- app/controllers/forum_post_votes_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/forum_post_votes_controller.rb b/app/controllers/forum_post_votes_controller.rb index d968489ea..733e3d50b 100644 --- a/app/controllers/forum_post_votes_controller.rb +++ b/app/controllers/forum_post_votes_controller.rb @@ -10,7 +10,7 @@ class ForumPostVotesController < ApplicationController end def create - @forum_post = ForumPost.permitted.find(params[:forum_post_id]) + @forum_post = ForumPost.visible(CurrentUser.user).find(params[:forum_post_id]) @forum_post_vote = @forum_post.votes.create(forum_post_vote_params.merge(creator: CurrentUser.user)) respond_with(@forum_post_vote) end