Browse Source

Fixed bug: ActiveJobLock is no actual ApplicationModel and don't need to inherit Model logic and capabilities.

Thorsten Eckel 5 years ago
parent
commit
87be5318c3
3 changed files with 6 additions and 9 deletions
  1. 5 0
      .rubocop.yml
  2. 0 8
      .rubocop_todo.yml
  3. 1 1
      app/models/active_job_lock.rb

+ 5 - 0
.rubocop.yml

@@ -166,6 +166,11 @@ Style/BracesAroundHashParameters:
   Description: 'Enforce braces style around hash parameters.'
   Enabled: false
 
+Rails/ApplicationRecord:
+  Exclude:
+    - 'app/models/application_model.rb'
+    - 'app/models/active_job_lock.rb'
+
 Rails/BulkChangeTable:
   Description: 'Check whether alter queries are combinable.'
   Enabled: false

+ 0 - 8
.rubocop_todo.yml

@@ -48,14 +48,6 @@ Metrics/ModuleLength:
 Metrics/PerceivedComplexity:
   Max: 115
 
-# Offense count: 3
-# Cop supports --auto-correct.
-Rails/ApplicationRecord:
-  Exclude:
-    - 'app/models/application_model.rb'
-    - 'app/models/notification.rb'
-    - 'app/models/token.rb'
-
 # Offense count: 2
 # Cop supports --auto-correct.
 # Configuration parameters: Include.

+ 1 - 1
app/models/active_job_lock.rb

@@ -1,4 +1,4 @@
-class ActiveJobLock < ApplicationModel
+class ActiveJobLock < ActiveRecord::Base
 
   def of?(active_job)
     active_job.job_id == active_job_id