Skip to content

Instantly share code, notes, and snippets.

@RunsFor
Created February 12, 2015 08:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RunsFor/8648be93943b6251b8f3 to your computer and use it in GitHub Desktop.
Save RunsFor/8648be93943b6251b8f3 to your computer and use it in GitHub Desktop.
WTF?
[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