Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

present?/presence always returns true #117

Open
tardate opened this issue Jun 15, 2013 · 0 comments
Open

present?/presence always returns true #117

tardate opened this issue Jun 15, 2013 · 0 comments

Comments

@tardate
Copy link

tardate commented Jun 15, 2013

I'm using meta_search 1.1.3 and discovered that it seems I can't trust present?/presence with a meta_search collection - they always return true, regardless of whether the result set has rows or not.

User.where(id: 0).present?
=> false  
User.search(id_eq: 0).present?
=> true

I was a little surprised, as this is counter to what I would expect if I assume it has the same behaviour as with ActiveRelation. Is this by design, expected behaviour, or something that should be fixed?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant