When you’re building webapps, sooner or later you run into a screen where you want to list some data. An index page of all people for instance. There are many other cases where you want a lot of data, but for now, let’s follow this path.
Say, you got thousands of people, you’re not going to show them all on one page, do you? Probably you will use something like will_paginate.
Say, you want to see this pagination stuff in action, in your development environment. Since you are not going to manualy create a couple of thousand people, one option could be to set the number of results per page to 1 or 5 or 6 or … well you know what I mean.
This will create 3000 people with the name John Smith. It becomes better when you throw in the faker gem.
This will create 3000 people with random names, which is better if you ask me.
Sign up for our newsletter
Who’s got the mic?
Architecture & Design
Koen Van Der Auwera
Bob Van Landuyt
Nathan de Witte