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

This commit is contained in:
Thorsten Eckel 2020-01-08 15:57:17 +01:00
parent 3d69f66898
commit 87be5318c3
3 changed files with 6 additions and 9 deletions

View file

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

View file

@ -48,14 +48,6 @@ Metrics/ModuleLength:
Metrics/PerceivedComplexity: Metrics/PerceivedComplexity:
Max: 115 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 # Offense count: 2
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: Include. # Configuration parameters: Include.

View file

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