1
0
Fork 0

Configure RuboCop

This commit is contained in:
Alex Kotov 2019-08-18 06:19:45 +05:00
parent 23efaa1279
commit 71047bc289
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
2 changed files with 6 additions and 2 deletions

View file

@ -45,6 +45,10 @@ Metrics/MethodLength:
Exclude:
- 'db/migrate/*.rb'
Naming/PredicateName:
Exclude:
- 'app/models/application_record.rb'
Rails:
Enabled: true

View file

@ -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)