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.

DEFAULT_WHERES like on non-string types #109

Description

@nicolai86

Hey,

I just tried making contain work on non-string types.

Patching MetaSearch::DEFAULT_WHERES enabled me to write the following:

Order.search(id_like: 12)

However, executing the query leads to SQL like the following:

SELECT * FROM orders where id like 0.

Some investigation turned out that MetaSearch correctly passes "%12%" to AREL, which seems to be the reason for my problem.

Do you have any idea on how to fix this, @ernie ? I'd like AREL not to change my "%12%" to 0.

Suggestions are welcome.

Thank you for your hard work!

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