Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

DataMapper plugin for magical timestamps

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 tasks Updated jeweler dep to 1.5.2 February 19, 2011
Octocat-spinner-32 .gitignore Ignore all Gemfile variants apart from the original November 26, 2010
Octocat-spinner-32 Gemfile
Octocat-spinner-32 LICENSE Updated Copyright year February 28, 2011
Octocat-spinner-32 README.rdoc [all] Changed README to .rdoc format August 19, 2009
Octocat-spinner-32 Rakefile
Octocat-spinner-32 VERSION
Octocat-spinner-32 dm-timestamps.gemspec
README.rdoc

dm-timestamps

DataMapper plugin which adds “magic” to created_at, created_on, et cetera.

Using

This plugin works by looking for the “created_at,” “updated_at,” “created_on” and “updated_on” properties. If they exist, it does the right thing by setting them or updating them. The *at properties should be of type DateTime, while the *on properties should be of type Date.

Alternatively, you can have all of this setup for you if you use the “timestamps” helper:

timestamps :at    # Add created_at and updated_at
timestamps :on    # Add created_on and updated_on
timestamps :created_at, :updated_on    # Add these only
Something went wrong with that request. Please try again.