I’ve run into a bit of a roadblock and am wondering how to best handle it.
Currently I have a User schema setup with a
has_many :favorite_books association. Each of these books have a
ranking field. Maybe I’ve missed it, but I don’t see a way to have
user.favorite_books always return them ordered according to their ranking.
I know I can order this with an Ecto query, however, as an example, when displaying them in a nested form using
inputs_for I’d like the favorite books to be rendered there by their ranking too.
Thanks for any help.