forum post votes: fix broken visible check.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user