I'm looking for a clean and simple way to print in the Rails Console the contents of my 5 row database with 2 columns.
Any ideas? I Googled around but didn't find much.
I think you should first use the hirb gem which provides a very pleasant way to print your tables columns.
gem install hirb
Enable hirb in the console:
require 'hirb' Hirb.enable
If you want to limit the number of rows to display, you can do:
You can also specify the fields that you want to display using select: