Error, "undefined method `order' for #<WillPaginate::Collection:0x2b3de8ca8a90>". faced. Help!

301 views
Skip to first unread message

Gordon Yeong

unread,
Jan 12, 2010, 4:27:30 AM1/12/10
to Searchlogic
Hi, there,

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!

markus_86

unread,
Jan 29, 2010, 11:24:02 AM1/29/10
to Searchlogic
I don't know if this helps you. But if I remember it right I had the
same error.

I found this solution:

def index
@search = Book.search(params[:search])
@books = @search.paginate :page => params[:page], :per_page => 5
end

Reply all
Reply to author
Forward
0 new messages