Enable the Style/ClassCheck cop

This commit is contained in:
gregoirenovel 2018-12-18 22:18:08 +01:00
parent fba8d97256
commit 616e9305e9
2 changed files with 3 additions and 3 deletions

View file

@ -847,7 +847,7 @@ Style/ClassAndModuleChildren:
Enabled: false
Style/ClassCheck:
Enabled: false
Enabled: true
Style/ClassMethods:
Enabled: true

View file

@ -41,11 +41,11 @@ class FileSizeValidator < ActiveModel::EachValidator
end
def validate_each(record, attribute, value)
if !value.kind_of?(CarrierWave::Uploader::Base)
if !value.is_a?(CarrierWave::Uploader::Base)
raise(ArgumentError, "A CarrierWave::Uploader::Base object was expected")
end
if value.kind_of?(String)
if value.is_a?(String)
value = (options[:tokenizer] || DEFAULT_TOKENIZER).call(value)
end