Ruby on Rails
Monday, June 4, 2018
On Monday, June 4, 2018 at 8:31:35 AM UTC-4, Colin Law wrote:
On 4 June 2018 at 12:10, fugee ohu <fuge...@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 storyI 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-ta...@googlegroups.com .
To post to this group, send email to rubyonra...@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 .
Sorry you're right Of course I know how to do it I wanted to know if there was a commonly used helper method that I didn't know about I decided it wasn't a good idea anyway and made a special section for top story because otherwise people will assume it's still the most recent story and disregard the following stories every time they revisit the page
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/76ddac9a-baf1-4281-a860-998820a1122e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment