public
Description: DataMapper plugin to add automatic updating of created_by_id and updated_by_id attributes
Homepage: http://dm-userstamp.rubyforge.org/
Clone URL: git://github.com/rlivsey/dm-userstamp.git
Wed Mar 25 14:42:53 -0700 2009
rlivsey (committer)
Fri Jun 12 03:40:59 -0700 2009
commit  e01eee51bbf65c8cc91a44b79b3406f5dfa645bf
tree    d2ed3eb0b644134f8aabed4c17eac48bf9b88c2b
parent  3f7cc0d20465c49945fe417dcce6cac59d123b74
name age message
file .DS_Store Loading commit data...
file History.txt Tue Aug 26 16:46:36 -0700 2008 package for hoe [rlivsey]
file LICENSE Tue Aug 26 14:28:11 -0700 2008 initial commit [rlivsey]
file Manifest.txt
file README.txt Sun Sep 07 12:43:05 -0700 2008 update docs [rlivsey]
file Rakefile
file TODO Tue Aug 26 15:10:24 -0700 2008 updated TODO and added CHANGELOG [rlivsey]
directory lib/
directory spec/
README.txt
= dm-userstamp

DataMapper plugin which adds "magic" to created_by_id, updated_by_id fields

Assumes a model called User and a class attribute of current_user
Just need to add created_by_id and/or updated_by_id Integer fields to the model

Eg:

class User
  include DataMapper::Resource
  include DataMapper::Userstamp::Stamper
  
  cattr_accessor :current_user
  ...
end

class Monkey
  include DataMapper::Resource
  
  property :created_by_id, Integer
  property :updated_by_id, Integer      
  ...
end

== Docs

See rubyforge project:
 * http://dm-userstamp.rubyforge.org/

== Install

sudo gem install dm-userstamp

== Thanks

Code based on:
 * AR userstamp plugin - http://github.com/ctran/userstamp/tree/master
 * DM timestamps plugin - http://github.com/sam/dm-more/tree/master/dm-timestamps