#168 √ resolved
spencer

maybe_will_paginate breaks on an empty result

Reported by spencer | February 23rd, 2011 @ 03:43 PM

/Users/spencerportee/.rvm/gems/ree-1.8.7-2010.02@patch/gems/sunspot-1.2rc2/lib/sunspot/search/abstract_search.rb:87

On the line above, if there are 0 results, maybe_will_paginate gets called with an empty collection. WillPaginate::Collection.create(1, 0, 0) is the result. WillPaginate doesn't like 0 results per page and raises an error.

Slightly inconvenient since the db can be seeded with at least one result, or not index that collection.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Awesome Solr interaction for Ruby

People watching this ticket