Add and apply Style/CollectionQuerying rubocop rule
This rule was added in rubocop 1.77. We were following it most of the time. It makes the code more readable in my humble opinion.
This commit is contained in:
@@ -84,7 +84,7 @@ module Globalizable
|
||||
length: options[:length],
|
||||
if: lambda { |translation| translation.locale == Setting.default_locale }
|
||||
end
|
||||
if options.count > 1
|
||||
if options.many?
|
||||
translation_class.instance_eval do
|
||||
validates method, options.reject { |key| key == :length }
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user