rspec/rspec-rails

Rails/RedundantActiveRecordAllMethod false positive

jcoyne opened this issue · 1 comments

jcoyne commented

Any time you call a method named all in a chain (e.g. document.marc_links.all.first.href), it assumes it to be the ActiveRecord::Base#all

This doesn't seem like a rule that is well suited for static analysis. There is no convention that state that only AR may define all. This makes it hard to use this cop as you have to sort though all of the occurrences and determine which are real (none in my case).

This is the rspec-rails repository, did you mean to open this on the rubocop-rails repository?