I didn’t understand where the date was (assuming it’s post[‘time’]), but sort_by is a cool thing:
bookmarks = r.recent(‘rpheath’,@per_page).sort_by { |post| post[‘time’] }
Vish
I didn’t understand where the date was (assuming it’s post[‘time’]), but sort_by is a cool thing:
bookmarks = r.recent(‘rpheath’,@per_page).sort_by { |post| post[‘time’] }
Vish
If the time is a number, then negate it for the sort_by:
bookmarks = r.recent('rpheath',@per_page).sort_by { |post| - post['time'] }
-Rob
Rob Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com