Skip to content

Instantly share code, notes, and snippets.

@jpemberthy
Created October 4, 2013 01:05
Show Gist options
  • Save jpemberthy/6819498 to your computer and use it in GitHub Desktop.
Save jpemberthy/6819498 to your computer and use it in GitHub Desktop.
1 row in set
>> user == User.last
=> true
>> user.persisted?
=> true
>> user.valid?
=> true
>> user.registration_details
+---------+----------+----------------+--------------+----------+----------------+-------------+-------------------------+
| user_id | referrer | pageview_count | source | platform | authentication | ip_address | created_at |
+---------+----------+----------------+--------------+----------+----------------+-------------+-------------------------+
| 465 | | | password.api | | | 200.1.1.100 | 2013-10-04 01:01:31 UTC |
+---------+----------+----------------+--------------+----------+----------------+-------------+-------------------------+
1 row in set
>> user.registration_details.valid?
=> true
>> user.registration_details.persisted?
=> true
>> User.last.registration_details
=> nil
@dmcaulay
Copy link

dmcaulay commented Oct 4, 2013

haha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment