Let’s say you have a collection with 10.000 records in your database and you want to put them all in a large array for some reason. With Rails, you can write something like this:
Now you can go get yourself a coffee, because the content of all your records will be output to the console window and it will do so for a while.
Here’s the quick tip: If you want to suppress the output, simply do something like this:
Problem solved. Easy, but I didn’t think of it immediately..
P.S.: You can follow me on Twitter.