In my controller, I have:
@bills = Bill.where(:param1 => x, :param2 => y).sort_by {|u| u.created_at}.reverse.paginate(:page => params[:page])
And I get the above-mentioned error when I try to render. Getting rid of the where, sort and reverse clauses gets rid of the problem but I need them. How can I have both?