forked from bjorntrondsen/user_stamp
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
33 lines (22 loc) · 1.03 KB
/
README
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
= UserStamp
Rails plugin that makes stamping records with a user when they are
created and updated dirt simple. It assumes that your controller has
a current_user method. It also assumes that any record being stamped
has two associations with user creator and updater.
You can override both of these assumptions easily.
== Setup
1. Add to Gemfile gem 'user_stamp', :git => git://github.com/UGE-developer/user_stamp.git
2. Add user_stamp to application.rb, like the following:
class ApplicationController < ActionController::Base
user_stamp Post, Asset, Job
end
== Defaults
UserStamp.creator_attribute = :creator
UserStamp.updater_attribute = :updater
UserStamp.current_user_method = :current_user
If your user stamped columns and current_user method are different,
just create an initializer such as config/initializers/user_stamp.rb
and copy and paste the defaults above, changing them to fit your app.
== Problems?
Use the issue tracker on Github.
Copyright (c) 2008 [John Nunemaker], released under the MIT license