Skip to content

Add invalid search term handling #34

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

Closed
wants to merge 1 commit into from

Conversation

goosys
Copy link
Contributor

@goosys goosys commented Jul 30, 2024

For security reasons, I would like to display a warning and reset the search results when invalid search parameters are included. What do you think?
I have divided it into several methods, so it can also function as it did previously.

Due to weak error handling on the Ransack side, it currently extracts the message from an ArgumentError. This issue seems to be under discussion on the Ransack side, so it might be handled by a dedicated error class in the future.
activerecord-hackery/ransack#1478

This is my sample application.
image

@blocknotes
Copy link
Owner

Thanks for the PR @goosys - I agree that we can handle invalid search terms, I preferred to apply some changes.

Replaced by #40

@blocknotes blocknotes closed this Apr 20, 2025
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

Successfully merging this pull request may close these issues.

2 participants