Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bumi/history-logger
DO NOT USE! - OLD! Easy (User)Action logging.
https://github.com/bumi/history-logger
Last synced: 4 days ago
JSON representation
DO NOT USE! - OLD! Easy (User)Action logging.
- Host: GitHub
- URL: https://github.com/bumi/history-logger
- Owner: bumi
- License: mit
- Created: 2008-10-28T02:08:53.000Z (about 16 years ago)
- Default Branch: master
- Last Pushed: 2008-10-29T15:52:39.000Z (about 16 years ago)
- Last Synced: 2023-04-10T23:12:45.130Z (over 1 year ago)
- Homepage: http://railslove.com
- Size: 82 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: MIT-LICENSE
Awesome Lists containing this project
README
HistoryLogger
=============Generator to generate a model for easy (User)Action logging.
You can use it for internal logging/reporting stuff but also for creating a facebook-like news streamUsage
=======
script/generate history [model name]for example:
script/generate history UserActionHave a look at the generated model for more information.
Example
=======class Comment < AR:Base
after_create :log_action
private
def after_create
UserAction.log_new_comment(:user=>self.user, :linked=>self, :to=>self.commentable)
end
endNote:
=======this code is a bit old and experimental... but it's used in several production sites ;)
Copyright (c) 2007 [Michael Bumann - railslove.com], released under the MIT license