rubygems - Ruby 2.1 and mislav-will_paginate 2.3.10 shows ERROR: NoMethodError: undefined method `paginate' -


does know i'm doing wrong here, installed ruby 2.1, sequel-4.26.0 gem , mislav-will_paginate-2.3.10 gem, when try use paginate function, keep getting following error:

code:

@user = user.paginate(:page => 1, :per_page => 2)

error message:

"error: nomethoderror: undefined method `paginate' #"

most paginate dataset method, not class method (this true sequel's pagination extension, not sure will_paginate). if want user.paginate work:

def user.paginate(*args)   dataset.paginate(*args) end 

Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -