Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add padrino support #33

Open
renich opened this issue Jul 17, 2014 · 2 comments
Open

Add padrino support #33

renich opened this issue Jul 17, 2014 · 2 comments

Comments

@renich
Copy link

renich commented Jul 17, 2014

Even, though, Padrino is a superset of Sinatra, the gem is not working in it.

This example made it work: https://gist.github.com/phildionne/5785087

@n40lab
Copy link

n40lab commented Jul 27, 2015

I know this is and old issue but I've succedeed using will_paginate-bootstrap with Padrino.

I've added the following to my boot.rb (using DataMapper ORM):

Padrino.before_load do
require 'will_paginate/data_mapper'
require "bootstrap_pagination/sinatra"
end

Also I've added the following to my app.rb:
register WillPaginate::Sinatra

I'm a Ruby/Padrino newbie so maybe it's not the best way to do this, but thanks to those lines I can use the will_paginate-bootstrap to paginate my results. I've tried to register the Sinatra

Great gem indeed! Thx

@CyberFerret
Copy link

Thank you @n40lab for pointing out the critical line above. I didn't have
require 'bootstrap_pagination/sinatra'
in my boot.rb under Padrino.before_load, and I was getting a App::BootstrapPagination::Sinatra undefined error. Adding this line fixed it, and the pagination works beautifully. Would have been a 5 minute task if not for this issue! As you said - great gem indeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants