From 4183b408f255c88e828f0b2675e70b0572291dfa Mon Sep 17 00:00:00 2001 From: yuenmichelle1 Date: Sat, 28 Oct 2023 00:18:49 -0500 Subject: [PATCH] missed hound review. update validate stats visibility to single line --- app/models/user_group.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/models/user_group.rb b/app/models/user_group.rb index d274fe71a..a9a81882b 100644 --- a/app/models/user_group.rb +++ b/app/models/user_group.rb @@ -41,9 +41,7 @@ class UserGroup < ApplicationRecord enum stats_visibility: STATS_VISIBILITY_LEVELS validate do - if @invalid_stats_visibility - errors.add(:stats_visibility, "Not stats_visibility type, please select from the list: #{STATS_VISIBILITY_LEVELS.keys}") - end + errors.add(:stats_visibility, "Not valid stats_visibility type, please select from the list: #{STATS_VISIBILITY_LEVELS.keys}") if @invalid_stats_visibility end validates :display_name, presence: true