Skip to content
Newer
Older
100644 38 lines (24 sloc) 1.06 KB
65e2719 @jnunemaker updated readme with rdoc info and reformatted prettier.
authored
1 = UserStamp
2ef9f29 @jnunemaker Added the user stamp files. Updated README and install.rb.
authored
2
3 Rails plugin that makes stamping records with a user when they are
4 created and updated dirt simple. It assumes that your controller has
5 a current_user method. It also assumes that any record being stamped
6 has two attributes--creator_id and updater_id. You can override both
7 of these assumptions easily.
8
65e2719 @jnunemaker updated readme with rdoc info and reformatted prettier.
authored
9 == Setup
2ef9f29 @jnunemaker Added the user stamp files. Updated README and install.rb.
authored
10
4e82f61 @jnunemaker Updated README with script plugin install stuff.
authored
11 1. script/plugin install git://github.com/jnunemaker/user_stamp.git
2ef9f29 @jnunemaker Added the user stamp files. Updated README and install.rb.
authored
12 2. Add user_stamp to application.rb, like the following:
13
14 class ApplicationController < ActionController::Base
15 user_stamp Post, Asset, Job
16 end
17
18
65e2719 @jnunemaker updated readme with rdoc info and reformatted prettier.
authored
19 == Defaults
20
21 UserStamp.creator_attribute = :creator_id
22 UserStamp.updater_attribute = :updater_id
23 UserStamp.current_user_method = :current_user
2ef9f29 @jnunemaker Added the user stamp files. Updated README and install.rb.
authored
24
25 If your user stamped columns and current_user method are different,
26 just create an initializer such as config/initializers/user_stamp.rb
27 and copy and paste the defaults above, changing them to fit your app.
28
65e2719 @jnunemaker updated readme with rdoc info and reformatted prettier.
authored
29 == Problems?
97f0a85 @jnunemaker Added lighthouse to readme.
authored
30
4903ecb @jnunemaker Updated readme.
authored
31 Use the issue tracker on Github.
97f0a85 @jnunemaker Added lighthouse to readme.
authored
32
65e2719 @jnunemaker updated readme with rdoc info and reformatted prettier.
authored
33 == Docs
34
35 http://rdoc.info/projects/jnunemaker/user_stamp
36
2ef9f29 @jnunemaker Added the user stamp files. Updated README and install.rb.
authored
37 Copyright (c) 2008 [John Nunemaker], released under the MIT license
Something went wrong with that request. Please try again.