I a have list of photo albums as below:
"Day 10 - Kblah"
"Day 9 - Lblah"
"Day 8 - Sblah"
"Day 7 - Ublah"
"Day 6 - Sblah"
"Day 5 - Cblah"
"Day 4 - Gblah"
"Day 3 - Sblah"
"Day 2 - Dblah"
"Day 1 - Hblah"
"Another album"
"Some more albums"
When I sort them by their title I end up with:
"Another album"
"Day 1 - Hblah"
"Day 10 - Kblah"
"Day 2 - Dblah"
"Day 3 - Sblah"
"Day 4 - Gblah"
"Day 5 - Cblah"
"Day 6 - Sblah"
"Day 7 - Ublah"
"Day 8 - Sblah"
"Day 9 - Lblah"
"Some more albums"
Where as I would like them to be:
"Another album"
"Day 1 - Hblah"
"Day 2 - Dblah"
"Day 3 - Sblah"
"Day 4 - Gblah"
"Day 5 - Cblah"
"Day 6 - Sblah"
"Day 7 - Ublah"
"Day 8 - Sblah"
"Day 9 - Lblah"
"Day 10 - Kblah"
"Some more albums"
I basically want to Natural sort on the title but an alphabetical natural sort. Is there any gem of any type that will do this correctly for me?
Kind regards, Neil
Thanks for the replies. I managed to locate a gem which worked wonders. It's called NaturalSorter and I just called it on my @albums instance variable in my controller to sort them by title and then it was passed through to the view.
Kind regards, Neil