We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dab16bb commit e09d411Copy full SHA for e09d411
app/controllers/protips_controller.rb
@@ -55,7 +55,7 @@ def mark_spam
55
56
def show
57
return (@protip = Protip.random.first) if params[:id] == 'random'
58
- @protip = Protip.includes(:comments).find_by_public_id!(params[:id])
+ @protip = Protip.includes(:comments).visible_to(current_user).find_by_public_id!(params[:id])
59
@comments = @protip.comments.visible_to(current_user)
60
61
data = {
0 commit comments