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
dm-userstamp / README.txt
100644 40 lines (26 sloc) 0.8 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
= 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