Created
February 12, 2015 08:07
-
-
Save RunsFor/8648be93943b6251b8f3 to your computer and use it in GitHub Desktop.
WTF?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[79] pry(main)> time = Time.zone.now | |
=> Thu, 12 Feb 2015 11:05:54 MSK +03:00 | |
[80] pry(main)> time.to_f | |
=> 1423728354.07368 | |
[81] pry(main)> user.update_attribute(:updated_at, time) | |
=> true | |
[82] pry(main)> user.updated_at.to_f | |
=> 1423728354.07368 | |
[83] pry(main)> user.reload.updated_at.to_f | |
=> 1423728354.073 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment