Created by: klaseskilson
Hi! As always, thank you for a great gem. Ran into a problem with a pretty straightforward fix. Hit me with your feedback!
Problem
When default scopes with joins are used, the generated search query can lead to ambiguity. For instance, the column id
may exist in two tables, which will lead to a SQL error when it is impossible to decide which table to use.
Solution
Add resource_class
's table_name
to the generated search query. This ensures that the generated query produces the format table_name.id
instead of id
in the where clause generated for the search.