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

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -