Maarten van den Berg 6 years ago
parent
commit
ec909203df
2 changed files with 2 additions and 8 deletions
  1. 0 6
      .rubocop.yml
  2. 2 2
      app/models/activity.rb

+ 0 - 6
.rubocop.yml

61
     - 'app/models/activity.rb'
61
     - 'app/models/activity.rb'
62
     - 'app/models/group.rb'
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
 # Offense count: 9
64
 # Offense count: 9
71
 # Cop supports --auto-correct.
65
 # Cop supports --auto-correct.
72
 # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods.
66
 # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods.

+ 2 - 2
app/models/activity.rb

199
       end
199
       end
200
 
200
 
201
       unless row['subgroup_division_enabled'].blank?
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
       end
203
       end
204
 
204
 
205
       unless row['no_response_action'].blank?
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
       end
207
       end
208
 
208
 
209
       result << a
209
       result << a