Ruby on Rails
Monday, June 4, 2018
On 4 June 2018 at 12:10, fugee ohu <fugee279@gmail.com> wrote:
How do I leave a specific row on top of sorted results I'm displaying news stories and I want the top story to stay on top for as long as it's the top story
I can't understand how you have to keep asking such basic questions. Isn't it obvious? Mark it in some way then do a sort on the two fields (top or not, and date or whatever else you are sorting by) so that it sorts by date within the topiness value. Alternatively just remove it from the set to be sorted before you sort them.
Colin
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com .
To post to this group, send email to rubyonrails-talk@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ .145c5f68-c155-4b8f-a4f6- 8fbc7161f469%40googlegroups. com
For more options, visit https://groups.google.com/d/optout .
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLtk2WC0_doV4B_gLcO9n1tbtKo87Hai8ZkCF3ctUvuzcA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment