Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Yaml Output in Rails Console
1) rails c
2) YAML::ENGINE.yamler = 'syck'
3) y @user.participant
--- !ruby/object:Participant
attributes:
id: 9
employee_hashed_ssn: "hashed ssn: 00001"
ch_member_id: 100
first_name: Test Employee 00001
middle_initial:
last_name: Employee Last 00001
birth_date: 1992-12-13
gender:
--- OR ---
1) rails c
2) pp @user.attributes
{"id"=>11,
"email"=>"tesu@domain.com",
"crypted_password"=>
"2944a302ab0437b22f70b8367db9affbf9c7b4cfe9d411dcf7177e46be345168d124be9975683d545d347dda169af8963d8a8119a41fae064ec20427df1988c4",
"password_salt"=>"K9N2qnhfte1evnEwiY0",
"created_at"=>Thu, 13 Dec 2012 19:33:24 UTC +00:00,
"updated_at"=>Thu, 13 Dec 2012 19:33:24 UTC +00:00,
"birth_date"=>Sat, 13 Dec 1997 19:33:23 UTC +00:00,
"hashed_ssn"=>nil,
"admin"=>nil,
"last_login_at"=>nil}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment