New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

models_timeline

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

models_timeline

0.0.2.2
Version published
Maintainers
1
Created

=TimeLine Track the entire life cycle of ActiveRecord models.

==Installation Add the gem to your Gemfile

gem "models_timeline"

Copy some migration stuff:

rake timeline:install:migrations rake db:migrate

Add to your route.rb file:

mount ModelsTimeline::Engine => "/timeline"

Requires Ruby 1.9.2 or later.

==Usage Call timeline in an ActiveRecord class and pass the name of the attributes you wish to track of your Model.

Track all attributes change of your AR model:

class Product < ActiveRecord::Base timeline end

This means that every attributes changes will be tracked.

Track one or more attributes:

class Product < ActiveRecord::Base timeline(:price, :name) end

Only the changes of name and price will be tracked.

To see the tracked changes go to:

http://domain:port/models_timeline

Development Questions or problems? Please post them on the issue tracker. You can contribute changes by forking the project and submitting a pull request. You can ensure the tests passing by running bundle and rake.

This gem is created by Angelo Capilleri and is under the MIT License.

FAQs

Package last updated on 28 Dec 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts