A quick reference to Rails Console.
Created on: 2019-01-22
Tag: cheat_sheet
To save rails console output to a file, do the following 1:
f = File.new("$file_name", 'w') f << command f.close
Run the following command to see all user with pretty print 2:
pp User.all
To delete a user run the following 2:: user = User.find_by_display_name("My New User Name") user.delete