https://github.com/parolkar/active_log
Auto version control for your activerecord objects
https://github.com/parolkar/active_log
Last synced: 8 months ago
JSON representation
Auto version control for your activerecord objects
- Host: GitHub
- URL: https://github.com/parolkar/active_log
- Owner: parolkar
- License: mit
- Created: 2010-07-12T15:43:09.000Z (almost 16 years ago)
- Default Branch: master
- Last Pushed: 2010-07-12T18:05:25.000Z (almost 16 years ago)
- Last Synced: 2025-04-02T01:07:49.934Z (about 1 year ago)
- Language: Ruby
- Homepage:
- Size: 85 KB
- Stars: 38
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.markdown
- License: MIT-LICENSE
Awesome Lists containing this project
README
ActiveLog
=========
You need ActiveLog when you want to automagically create changelog of all activerecord changes in your rails app, asynchronously. It will keep track of all changes on attributes and as a bonus it can also record which user (session's current_user) made the change.
Example
-------
add "records\_active_log" to all models which needs to be logged
class User < ActiveRecord::Base
records_active_log
end
You can access logs either by user or all...
>>u = User.first
>>u.active_logs
=> [...]
or
>> ActiveLog.all
If you want to log along with information of currently logged in user then you should consider adding a before filter to application controller which sets ActiveLog.current = current_user
Copyright (c) 2010 Abhishek Parolkar, released under the MIT license