Skip to content

Commit e09d411

Browse files
committed
404 bad protips for non bad users
1 parent dab16bb commit e09d411

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controllers/protips_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def mark_spam
5555

5656
def show
5757
return (@protip = Protip.random.first) if params[:id] == 'random'
58-
@protip = Protip.includes(:comments).find_by_public_id!(params[:id])
58+
@protip = Protip.includes(:comments).visible_to(current_user).find_by_public_id!(params[:id])
5959
@comments = @protip.comments.visible_to(current_user)
6060

6161
data = {

0 commit comments

Comments
 (0)