Enable the Style/ClassCheck cop
This commit is contained in:
parent
fba8d97256
commit
616e9305e9
2 changed files with 3 additions and 3 deletions
|
@ -847,7 +847,7 @@ Style/ClassAndModuleChildren:
|
|||
Enabled: false
|
||||
|
||||
Style/ClassCheck:
|
||||
Enabled: false
|
||||
Enabled: true
|
||||
|
||||
Style/ClassMethods:
|
||||
Enabled: true
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue