@hlfan commented on this pull request.


> @@ -275,11 +275,12 @@ def preferred_editor
   end
 
   def preferred_color_scheme(subject)
-    if current_user
-      current_user.preferences.find_by(:k => "#{subject}.color_scheme")&.v || 
"auto"
-    else
-      "auto"
-    end
+    scheme = current_user ? current_user.preferences.find_by(:k => 
"#{subject}.color_scheme")&.v : nil

Only with offending RuboCop. But not going into the subjects loop seems even 
better.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6492#discussion_r2492571312
You are receiving this because you are subscribed to this thread.

Message ID: 
<openstreetmap/openstreetmap-website/pull/6492/review/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to