-
Notifications
You must be signed in to change notification settings - Fork 868
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
:count yields wrong result #449
Comments
When you use In this case, you can use:
you can read more about that here: |
Reproduction
Expected
Actual
Explanation
From an ActiveRecord perspective I am holding a
Relation
, that results in 10 records being returned. I don't understand, how the count for this relation could be higher.Or to write it as rspec expectation:
Workaround?
If (for some reason) this problem is not as easily solvable:
Is there a work around? The best solution I could find is calling
to_a
, which of course will perform the full SQL query.The text was updated successfully, but these errors were encountered: