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

Enable ordering by HasOne fields #2325

Merged
merged 3 commits into from Apr 19, 2023

Conversation

elrosa
Copy link
Contributor

@elrosa elrosa commented Jan 29, 2023

Currently, users are able to sort by BelongsTo fields (using ID or selected attribute) and HasMany fields.

This PR adds support for sorting by HasOne fields using both ID or selected attribute (passed via Field::HasOne.with_options(order: attribute_name).

@pablobm pablobm merged commit 8648c77 into thoughtbot:main Apr 19, 2023
@pablobm
Copy link
Collaborator

pablobm commented Apr 19, 2023

Thank you!

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.

None yet

3 participants