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

present?/presence always returns true #117

Description

@tardate

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions