I am using searchlogic (with Will Paginate) in an application and
must say it's neat.
Nevertheless, I am trying to enable sorting on the result sets by some
defined order.
When I run my application's search and the results are to be
displayed, I get an error of
"undefined method `order' for #<WillPaginate::Collection:
0x2b3de8ca8a90>".
I refered to the railscast by Ryan Bates (http://railscasts.com/
episodes/176-searchlogic)
and noticed that I am not the only one facing this same problem.
Another guy, "Ritest" is too facing this issue.
Please help :)
thank you, all!
I found this solution:
def index
@search = Book.search(params[:search])
@books = @search.paginate :page => params[:page], :per_page => 5
end