Skip to content

Instantly share code, notes, and snippets.

@tomoya55
Created November 24, 2009 06:58
Show Gist options
  • Select an option

  • Save tomoya55/241704 to your computer and use it in GitHub Desktop.

Select an option

Save tomoya55/241704 to your computer and use it in GitHub Desktop.
module DataMapper
module Timestamps
def self.included(model)
model.before :save, :set_timestamps_on_save
model.before :save!, :set_timestamps_on_save
model.extend ClassMethods
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment