Ordering Smart fields feature
Cannot find in the ForestAdmin/Rails documentation a way to make it work.
A symbol I can pass to the
fielddefinition that could be used to sort by Smart field
- Project name: Trustpair
- Team name: Product
- Environment name: Development
- Gem version used:
gem 'forest_liana', '~> 7.4'
- Rails version:
- DB: Postgres
I recently was asked to make some fields available to filtering and sorting.
These fields are not directly persisted in the view I’m working on (we are talking about columns persisted in a related model - a
belongs_to model relationship).
But I wasn’t able to find a solution for the sorting feature.
The docs says to look on this page, but as it is a JS exemple, and the gem doesn’t seem to provide a way to give a lambda to the
field method and write some custom SQL to achieve this, I’m a bit lost.
Could you indicate me a way to handle this ?