No commit activity in last 3 years
No release in over 3 years
Records modification time for specified database columns on a per-row basis (ActiveRecord).
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3.6
~> 0.3.5

Runtime

~> 3
 Project Readme

timestamped_column

Build Status Dependency Status

Records the modification time for specific database columns on individual records (using ActiveRecord).

Requirements

  • Rails 3

Tested and working correctly with:

  • Ruby: 1.8.7 1.9.3
  • Rails: 3.0, 3.1, 3.2 and edge.

View the test results for the most recent commit using these Ruby and Rails version combinations (thanks to Travis CI).

Installation

Add timestamped_column to your Gemfile:

gem 'timestamped_column'

Usage

Usage is similar to how created_at/updated_at function in Rails. All you need to start tracking attribute modification times is to add a new column to store the modification value. The column that tracks the modification value should be suffxed with either _updated_at or _updated_on.

Example

If you have a model User with an attribute name that you want to track the modification time of you just simple add an column named name_updated_at (or name_updated_on) to the users table.

timestamped_column checked for the presence of columns named like this and automatically updates these when the attributes they track are changed.