Giter Site home page Giter Site logo

roda-will_paginate's People

Contributors

celsworth avatar manuca avatar wafcio avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

dashdotat

roda-will_paginate's Issues

How to use the plugin?

I'm unable to figure out how to get the plugin to work. I've created a test Roda/Sequel/Postgres app. Gem is installed and plugin :will_paginate added. Routes have this;

r.root do
  @posts = Post.reverse_order(:created_at).paginate(page: 1)
  view("homepage")
end

And the view is like this;

<% @posts.each do |post| %>
  <!-- STUFF -->
<% end %>
<%= will_paginate @posts %>

This gives the error;

NoMethodError: undefined method `paginate' for Post:Class

Okay, perhaps I need the Sequel pagination plugin; DB.extension(:pagination) and change the .paginate to;

@posts = Post.reverse_order(:created_at).paginate(1, 10)

But this doesn't work either;

NoMethodError: undefined method `total_pages' for #<#<Class:0x007fa7fb6255e8>:0x007fa7fb4f4f48>

Obviously I'm doing something wrong, I just don't know what. Can you help?

Can not rackup

I have a simple blog-like Roda/Sequel test app; I've include the gem in the Gemfile and added plugin :will_paginate to app.rb, but when I rackup I get the following errors;

.../roda-will_paginate-0.0.3/lib/roda/plugins/will_paginate.rb:11: warning: toplevel constant WillPaginate referenced by Roda::WillPaginate
.../roda-will_paginate-0.0.3/lib/roda/plugins/will_paginate.rb:11:in `configure': uninitialized constant WillPaginate::LinkRenderer (NameError)

Do you have any idea why?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.