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 querieswill_paginate
generates. What do they do?
Posted by Henning Koch to makandra Curriculum (2015-07-08 17:29)