Maarten van den Berg 6 anni fa
parent
commit
ec909203df
2 ha cambiato i file con 2 aggiunte e 8 eliminazioni
  1. 0 6
      .rubocop.yml
  2. 2 2
      app/models/activity.rb

+ 0 - 6
.rubocop.yml

@@ -61,12 +61,6 @@ Naming/PredicateName:
61 61
     - 'app/models/activity.rb'
62 62
     - 'app/models/group.rb'
63 63
 
64
-# Offense count: 2
65
-# Cop supports --auto-correct.
66
-Performance/Casecmp:
67
-  Exclude:
68
-    - 'app/models/activity.rb'
69
-
70 64
 # Offense count: 9
71 65
 # Cop supports --auto-correct.
72 66
 # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods.

+ 2 - 2
app/models/activity.rb

@@ -199,11 +199,11 @@ class Activity < ApplicationRecord
199 199
       end
200 200
 
201 201
       unless row['subgroup_division_enabled'].blank?
202
-        a.subgroup_division_enabled = row['subgroup_division_enabled'].downcase == 'y'
202
+        a.subgroup_division_enabled = row['subgroup_division_enabled'].casecmp('y').zero?
203 203
       end
204 204
 
205 205
       unless row['no_response_action'].blank?
206
-        a.no_response_action = row['no_response_action'].downcase == 'p'
206
+        a.no_response_action = row['no_response_action'].casecmp('p').zero?
207 207
       end
208 208
 
209 209
       result << a