Skip to content

Commit

Permalink
missed hound review. update validate stats visibility to single line
Browse files Browse the repository at this point in the history
  • Loading branch information
yuenmichelle1 committed Oct 28, 2023
1 parent e86811a commit 4183b40
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/models/user_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4183b40

Please sign in to comment.