📅  最后修改于: 2022-03-11 15:00:04.248000             🧑  作者: Mango
# output to go into the log file (i.e logs/test.log)
Rails.logger.debug variable.inspect
Rails.logger.debug variable.to_yaml
# output in the console
require 'pp'
it 'does something'
thing = Factory(:something)
pp thing
end
# or
put s thing.to_yaml