Rails: How to display results with Yaml in console

ruby-on-rails, yaml

Solution

require 'yaml'
puts user.to_yaml

Problem

I'm retrieving some records from a database using `user = Users.all` in the console but they are very unreadable. I know that Yaml will make it more legible but don't know how to convert the results to Yaml.

Original source