190 Pagination [0.5d]

Posted Almost 9 years ago. Visible to the public.

Goals

  • Understand why we use pagination

Exercises

  • Create 7500 movies in MovieDB (hint: Doing it in a single transaction is much faster). Load the movies index and measure how long it renders.
  • Use the will_paginate gem to add pagination to MovieDB's list of movies. How long does the movies index render now?
  • Inspect the HTML generated by will_paginate. Customize the style so it matches the look of your MovieDB.
  • tail -f log/development.log and see which queries will_paginate generates. What do they do?
Henning Koch
Last edit
10 months ago
Henning Koch
License
Source code in this card is licensed under the MIT License.
Posted by Henning Koch to makandra Curriculum (2015-07-08 17:29)