0.08
Repository is archived
No commit activity in last 3 years
No release in over 3 years
DataMapper plugin for magical timestamps
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6.4
~> 0.9.2
~> 1.3.2

Runtime

~> 1.2.0
 Project Readme

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