Shortcut for pretty printing Active Record data in the rails console
Public, Command Line, Shortcuts, Tricks
harrylevine
Created: Mar 28, 2016 Updated: Mar 28, 2016
In the rails console
, when you run something like Post.all
it returns all of the posts in one big continuous paragraph. A quick, low-rent shortcut to get these records to pretty print is to:
y
For example:
Source: SO answer