Flaviu Simihaian's Blog - Entrepreneur and Developer

Awesome_print and Pry = Sane Rails Console

I recently found out about awesome_print so I gave it a try.

It lets you print objects very nicely, like the adjacent image shows.

Moreover, I am already using pry.

So, I can type something like this in the Rails console to print all the users:

1
2
cd User
all

Combining these two gems, I can now get the output in the image above like this:

1
2
cd Survey
ap first;

The beauty of this made me want to blog it. That is all.

Comments

Fork Flaviu on GitHub