Created
June 17, 2010 18:20
-
-
Save jtushman/442507 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ActivityMonitor | |
include Tracking::ActivityMonitor | |
def initialize | |
monitor Answer, :only => [:update,:destroy,:create], | |
:alias => {:create => :answered}, | |
:target => :question | |
monitor Company | |
monitor Comment, :only => [:create, :update, :destroy], | |
:target => :commentable, | |
:alias => {:create => :commented, :update => "updated comment", :destroy => "deleted comment"} | |
monitor Intel, :only => [:show,:update,:destroy,:create,:download], | |
:alias => {:download => :downloaded} | |
monitor Plant | |
monitor Question, :only => [:show,:create,:update,:destroy], | |
:alias => {:create => :asked} | |
monitor Vote, :only => [:create,:destroy], | |
:alias => {:create => :voted}, | |
:target => :voteable | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment