From 7ab7452f659a4ea7d8143be1bb471332b96c3707 Mon Sep 17 00:00:00 2001 From: madhums Date: Sat, 24 Jun 2023 13:46:16 +0200 Subject: [PATCH] add code comments --- app/policies/discussion_policy.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/policies/discussion_policy.rb b/app/policies/discussion_policy.rb index 3a631849..2f8edb8a 100644 --- a/app/policies/discussion_policy.rb +++ b/app/policies/discussion_policy.rb @@ -32,6 +32,8 @@ def permitted_attributes %i[title description] end + # We let everyone see discussions if they are logged in. + # Even for an admin this is true. def index? !!user end