padrino / padrino-recipes

A collection of padrino templates and plugins
http://www.padrinorb.com
292 stars 50 forks source link

again will_paginate plugin corrections (issue #34) #35

Closed wokibe closed 11 years ago

wokibe commented 12 years ago

No one is assigned Sometimes I run into the situation, that my corrections for issue #33 generate at padrino start the error: "uninitialized constant WillPaginate::Sinatra".

I could not pin down the cause for this behavior, but some experiments (with the help of an old will_paginate issue mislav/will_paginate#149) delivered a solution:

I had to move the three will_paginate requires in boot.rb into the Padrion.before_load block.

I will submit an pull request with this change, plus the missing addition to the Gemfile: inject_into_file destination_root('Gemfile'), "gem 'will_paginate', '~>3.0'\n", :after => "Component requirements\n"

best regards Wolfkibe

dariocravero commented 11 years ago

Works perfectly! Many thanks @wokibe and sorry for the delay in merging this!.. :)