close
Skip to content

Enable ordering by HasOne fields#2325

Merged
pablobm merged 3 commits into
thoughtbot:mainfrom
elrosa:order-for-has-one-relationships
Apr 19, 2023
Merged

Enable ordering by HasOne fields#2325
pablobm merged 3 commits into
thoughtbot:mainfrom
elrosa:order-for-has-one-relationships

Conversation

@elrosa
Copy link
Copy Markdown
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
Copy Markdown
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.

3 participants