/PaginationDemo

Demo solution for an inappropriately complicated Bloc assignment: locally re-implementing will_paginate

Primary LanguageRuby

Rather than merging it into your project only to be immediately thrown away in favour of the actual will_paginate, here's a demo in a very simple sample app (just a Things#index) that we can go over in isolation. Check it out here.

The "plumbing" here is relatively simple:

Also includes some simple views, with associated helper, so this is effectively a full solution to the assignment.


To test out:

  • git clone this repo

  • bundle install

  • rake db:migrate

  • rake db:seed

  • rails s

  • Navigate to http://localhost:3000/things

  • Click the pagination links and reflect