Configure RuboCop
This commit is contained in:
parent
23efaa1279
commit
71047bc289
2 changed files with 6 additions and 2 deletions
|
@ -45,6 +45,10 @@ Metrics/MethodLength:
|
|||
Exclude:
|
||||
- 'db/migrate/*.rb'
|
||||
|
||||
Naming/PredicateName:
|
||||
Exclude:
|
||||
- 'app/models/application_record.rb'
|
||||
|
||||
Rails:
|
||||
Enabled: true
|
||||
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
class ApplicationRecord < ActiveRecord::Base
|
||||
self.abstract_class = true
|
||||
|
||||
def self.has_many(*args) # rubocop:disable Naming/PredicateName
|
||||
def self.has_many(*args)
|
||||
options = args.extract_options!
|
||||
options[:dependent] ||= :restrict_with_exception
|
||||
super(*args, options)
|
||||
end
|
||||
|
||||
def self.has_one(*args) # rubocop:disable Naming/PredicateName
|
||||
def self.has_one(*args)
|
||||
options = args.extract_options!
|
||||
options[:dependent] ||= :restrict_with_exception
|
||||
super(*args, options)
|
||||
|
|
Reference in a new issue