joshnabbott / acts_as_loggable Goto Github PK
View Code? Open in Web Editor NEWAllows you to have an audit trail of crud actions performed on ActiveRecord models.
Home Page: http://iammrjoshua.com
License: MIT License
Allows you to have an audit trail of crud actions performed on ActiveRecord models.
Home Page: http://iammrjoshua.com
License: MIT License
ActsAsLoggable ============== How many times have you been informed by a customer or visitor to your site of a horrible type right on your front page and thought "Huh. That's weird, I don't usually make mistakes like that. I wonder who messed that up?" Well, ActsAsLoggable is a simple plugin that gives you the power to know who it was and when they did it. It's as simple as adding acts_as_loggable to the model you want to "Big Brotherize" and then sit back and enjoy the peace of mind knowing that whatever records are getting added, edited, or destroyed you'll know who did it. ActsAsLoggable also supports standard :except and :only conditions (acts_as_loggable :except => [ :create, :update ]). A few things you need to keep in mind with ActsAsLoggable are: 1.) It only records create, update, and destroy actions. 2.) AAL was built using RestfulAuthentication as my User authentication module which doesn't really mean anything other than it assumes you're working with a User model and assumes the User's session is stored as current_user. That can be easily changed if you working with a different setup USAGE: 1.) Install the plugin ./script/plugin install git://github.com/joshnabbott/acts_as_loggable.git 2.) Run plugin generator ./script/generate acts_as_loggable 3.) Add these lines to app/models/user.rb: cattr_accessor :current_user has_many :action_logs 4.) Add this to application_controller.rb: before_filter do |controller| User.current_user = controller.instance_eval { current_user } end 5.) Add to any model you want to be action logged acts_as_loggable Copyright (c) 2008 Joshua Abbott, released under the MIT license
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.