I want to put the index of section in order by two fields: featured
and startDate
. Basically, I want the featured
entries to rise to the top of the index, and then within the featured posts I want them to be sorted by startDate
field. Below the featured entries, I want the other entries to also be sorted by startDate
.
I tried entries.order('featured desc').order('startDate desc')
but, as I expected, it simply ordered by startDate
because that method executed after ordering by featured
.
Is there any way to achieve what I'm tring to do?