You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow exists at the end of multi-line chain, even after .where
Describe alternatives you've considered
I may merge some where clauses, but not all of them (e.g. with not for instance) - so having both where and exists? looks strange to me.
# group all possible where (except not)User.joins(:profile).where.not(attr1: "foo").exists?(profile: {kind: "bar"},attr2: "bar")# put joins and related where at one lineUser.joins(:profile).where(profile: {kind: "bar"}).where.not(attr1: "foo").exists?(attr2: "bar")
Also.. I prefer to have single exists? over where.exists? for simple cases, so using EnforcedStyle: where is not an option for me.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
If there is multiple (especially) multiline
where
, merging only the last intoexists
doesn't improve the readability.Example
Currently it enforces
Describe the solution you'd like
Allow
exists
at the end of multi-line chain, even after.where
Describe alternatives you've considered
I may merge some where clauses, but not all of them (e.g. with
not
for instance) - so having bothwhere
andexists?
looks strange to me.Also.. I prefer to have single
exists?
overwhere.exists?
for simple cases, so usingEnforcedStyle: where
is not an option for me.The text was updated successfully, but these errors were encountered: