Skip to content


Subversion checkout URL

You can clone with
Download ZIP
A Rails plugin that adds the ability to automatically stamp each record with the currently logged in user.
Latest commit 33bc554 @bkeepers bkeepers committed with Added a gemspec
Failed to load latest commit information.
.gitignore Added the user stamp files. Updated README and install.rb.
MIT-LICENSE Added the user stamp files. Updated README and install.rb.
README updated readme with rdoc info and reformatted prettier.
Rakefile Added the user stamp files. Updated README and install.rb.
user_stamp.gemspec Added a gemspec


= 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 attributes--creator_id and updater_id. You can override both
of these assumptions easily.

== Setup

1. script/plugin install git://
2. Add user_stamp to application.rb, like the following:
		class ApplicationController < ActionController::Base
		  user_stamp Post, Asset, Job

== Defaults

  UserStamp.creator_attribute   = :creator_id
  UserStamp.updater_attribute   = :updater_id
  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.

== Docs

Copyright (c) 2008 [John Nunemaker], released under the MIT license
Something went wrong with that request. Please try again.