diff --git a/client_side_validations.gemspec b/client_side_validations.gemspec index 1f29057e7..c26231824 100644 --- a/client_side_validations.gemspec +++ b/client_side_validations.gemspec @@ -36,7 +36,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'minitest', '~> 5.14' spec.add_development_dependency 'mocha', '~> 1.11' spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 0.92.0' + spec.add_development_dependency 'rubocop', '~> 0.93.0' spec.add_development_dependency 'rubocop-performance', '~> 1.8' spec.add_development_dependency 'rubocop-rails', '~> 2.8' spec.add_development_dependency 'simplecov', '>= 0.18.5', '< 0.20' diff --git a/lib/generators/client_side_validations/copy_assets_generator.rb b/lib/generators/client_side_validations/copy_assets_generator.rb index c1454b4c9..aec6b2ab1 100644 --- a/lib/generators/client_side_validations/copy_assets_generator.rb +++ b/lib/generators/client_side_validations/copy_assets_generator.rb @@ -4,7 +4,7 @@ module ClientSideValidations module Generators class CopyAssetsGenerator < Rails::Generators::Base def copy_javascript_asset - return unless self.class == CopyAssetsGenerator || copy_assets? + return unless instance_of?(CopyAssetsGenerator) || copy_assets? assets.each do |asset| source_paths << asset[:path]