-
Notifications
You must be signed in to change notification settings - Fork 81
Smart field searching broken in rails 7.2.2 #703
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
Comments
Hi @jordanell , thanks for your feedback. Instead of using Here's an example:
The documentation will be updated soon. |
Hey @nicolasalexandre9
The query snippet I can see in the logs says that the generated SQL query looks something like
Which is telling me that it is putting the filter inside the where clause which generated invalid SQL. |
Hi @bolinkd, Could you share the request payload and the SQL query ? |
Uh oh!
There was an error while loading. Please reload this page.
Expected behavior
Following this documentation https://docs.forestadmin.com/documentation/reference-guide/smart-fields#searching-sorting-and-filtering-on-a-smart-field should produce the expected results as outline in the docs.
Actual behavior
However, after upgrading to Rails 7.2.2 and ForestLiana 9.5.4 it won't work.
I believe what has happened is Rails 7.2 changed the way some of their internal APIs work and broke the way forest was doing this custom searching with the
ActiveRecord::Relation::WhereClause
predicates. I guess this is the risk of trying to manipulate internal APIs to begin with, you are subject to their breaking changes.Failure Logs
I've modified the documentation example to show logging to show that the query is not being edited as predicted.
which produces:
I slightly modified the output to just remove the additional column that my database actually has.
Context
The text was updated successfully, but these errors were encountered: