Skip to content
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

Specify if search should be case-insensitivity #15

Open
EdCordata opened this issue Apr 13, 2021 · 1 comment
Open

Specify if search should be case-insensitivity #15

EdCordata opened this issue Apr 13, 2021 · 1 comment

Comments

@EdCordata
Copy link

EdCordata commented Apr 13, 2021

I think it should be a good feature to add case-insensitivity.

So that would be this in MySql:

LOWER(posts.title) LIKE (?)

or this in PostgeSQL:

posts.title ILIKE (?)

So, maybe it could be:

Post.where.ilike(title: "%rails%")
Post.where.not_ilike(title: "%rails%")
@ReneB
Copy link
Collaborator

ReneB commented Jul 6, 2021

Hi EdCordata,

Sorry for not getting back to you sooner, I haven't been around Github recently.

According to the tests, the search is already case insensitive. Are you seeing any bugs there?

If you want any additional behavior - like case sensitivity, rather than insensitivity - I would happily accept any pull requests (with passing tests), but I haven't been doing any active Rails development for years so I think it would be quite a tough nut for me to crack.

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

No branches or pull requests

2 participants