Skip to content

Instantly share code, notes, and snippets.

@voxxit
Created February 4, 2010 21:49
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 voxxit/295159 to your computer and use it in GitHub Desktop.
Save voxxit/295159 to your computer and use it in GitHub Desktop.
def column
Time.parse(read_attribute(:column))
end
def column=(datetime)
write_attribute(:column, datetime.to_i)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment