Skip to content

Instantly share code, notes, and snippets.

@voxxit
Created February 4, 2010 21:49
Show Gist options
  • Select an option

  • Save voxxit/295159 to your computer and use it in GitHub Desktop.

Select an option

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