lingz / alphabetical_paginate

An Alphabetical Pagination gem for Ruby on Rails
MIT License
24 stars 25 forks source link

Ensure 'All' remains at the front of the pagination array #32

Closed sprosser closed 9 years ago

sprosser commented 9 years ago

There was an issue where if you include all and then multiple alphabetical_paginate calls the first would appear as:

All, A, B, C, D....

But all subsequent alphabetical_paginate calls (on the same page) would produce:

A, All, B, C, D....

This was due to how it was checking and sorting. Just simply updated it to ensure "All" is always first to avoid inconsistency.