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:
|
Exclude:
|
||||||
- 'db/migrate/*.rb'
|
- 'db/migrate/*.rb'
|
||||||
|
|
||||||
|
Naming/PredicateName:
|
||||||
|
Exclude:
|
||||||
|
- 'app/models/application_record.rb'
|
||||||
|
|
||||||
Rails:
|
Rails:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
class ApplicationRecord < ActiveRecord::Base
|
class ApplicationRecord < ActiveRecord::Base
|
||||||
self.abstract_class = true
|
self.abstract_class = true
|
||||||
|
|
||||||
def self.has_many(*args) # rubocop:disable Naming/PredicateName
|
def self.has_many(*args)
|
||||||
options = args.extract_options!
|
options = args.extract_options!
|
||||||
options[:dependent] ||= :restrict_with_exception
|
options[:dependent] ||= :restrict_with_exception
|
||||||
super(*args, options)
|
super(*args, options)
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.has_one(*args) # rubocop:disable Naming/PredicateName
|
def self.has_one(*args)
|
||||||
options = args.extract_options!
|
options = args.extract_options!
|
||||||
options[:dependent] ||= :restrict_with_exception
|
options[:dependent] ||= :restrict_with_exception
|
||||||
super(*args, options)
|
super(*args, options)
|
||||||
|
|
Reference in a new issue