require 'dm-timestamps'
class Asset
include DataMapper::Resource
property :id, Integer, :serial => true
property :created_at, DateTime
property :updated_at, DateTime
end
Datamapper Timestamps
Posted by Peter
on Jul 18, 08
If you want your created_at, updated_at, created_on and updated_on fields automatically set in your Datamapper model, you need to require 'dm-timestamps' before.
I filed a bug on lighthouse, you can find more information and a test case there.
http://wm.lighthouseapp.com/projects/4819/tickets/614-dm-timestamps-doesnt-set-created_atcreated_on-when-no-other-properties-are-set