ruby - will_paginate helper undefined in sinatra with mongoid -
i using sinatra 1.4.3 , mongoid 3.1.4. tried adding will_paginate gem master branch mongoid support added gemfile:
gem 'will_paginate', :git => 'git://github.com/mislav/will_paginate.git', :branch => 'master'
in environment.rb added:
require 'will_paginate' require 'will_paginate/mongoid'
and pagination method started working. have still problem will_paginate helper. in views errors like:
nomethoderror: undefined method `will_paginate' #<class:0x006ff5df8578b0>
am missing helper work under sinatra?
i don't know if it's best solution adding
include willpaginate::sinatra::helpers
in controller solved problems.
Comments
Post a Comment