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

ignore_unknown_conditions apply to non-allowed attributes for SORT too? #1427

Open
jrochkind opened this issue Jun 20, 2023 · 0 comments
Open

Comments

@jrochkind
Copy link

ignore_unknown_conditions seems not to apply to sort conditions -- if I try to sort on an by using ransack's sort_link to generate sort links---

If I forget to list the attribute I'm sorting on in ransackable_attributes or ransortable_attributes --

I do not get an exception raised even with c.ignore_unknown_conditions = false.

Instead, the sort link just does nothing.

It would be nice to get an exception instead, per c.ignore_unknown_conditions?

Or, hypothetically ransack could optionally even raise at the generation of sort_link, if sorting on something that is not going to work because it's not allow-listed. But I can see how that might get tricky.

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

1 participant