Does noting to before_validation { to_downcase %w[email] }
Layout/SpaceBeforeBrackets: a space is incorrectly added to before_validation { to_downcase %w[email] } => before_validation { to_downcase % w[email] }
Add before_validation { to_downcase %w[email] }to model file
$ [bundle exec] rubocop -V
1.7.0 (using Parser 2.7.2.0, rubocop-ast 1.3.0, running on ruby 2.7.2 x86_64-linux)
- rubocop-performance 1.9.1
- rubocop-rails 2.9.1
- rubocop-rspec 2.1.0
Another example that should not generate a warning:
link_to [@site, person] do
content_tag(:span, person.email)
end
Actually, this fails with any method that accepts an array as params, if not using parenthesis (which is quite common in DSLs)
Most helpful comment
Actually, this fails with any method that accepts an array as params, if not using parenthesis (which is quite common in DSLs)