Is this how will_paginate is used? The example in their documentation doesn’t demonstrate result of a sql query.
I installed included the gem in the gem file, restarted without any errors. but still not working.
def list_items
@list = Item.find(:all, :select => 'status', :conditions => { :status => ["New"]} )
@list_page = @list.paginate(:per_page => 10)
respond_to do |format|
format.html { render :partial => 'item_list'}
format.js
end
end
NoMethodError (undefined method `paginate' for #<Array:0x97bd3fc>):
https://github.com/mislav/will_paginate/wiki/Backwards-incompatibility
You need to add
require 'will_paginate/array'