rubocop-rails
rubocop-rails copied to clipboard
Cop requests: Merge ActiveRecord's multiple `where` into one
Is your feature request related to a problem? Please describe.
e.g. .where(column1: :a).where(column2: :b)
-> .where(column1: :a, column2: :b)
Describe the solution you'd like
I'd like to auto fix it, maybe :)
Describe alternatives you've considered
Or, do we ourselves write these cops?
Additional context
I cut one out of #953 issue which describes multiple issues.
Technically, where.not etc need to be taken care of. Can you open this a new separate issue?
Hey @koic , do you need help with this one? I think I'll have couple of hours weekly free to work on OS and I'd be happy to help(with this one or with anything other) 😅
Perhaps this is this cop that should be discussed first in the Rails style guide. Please open a proposal with the style guide first: https://github.com/rubocop/rails-style-guide