No commit activity in last 3 years
No release in over 3 years
my take on a timestamping plugin for sequel
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0
 Project Readme

sequel_timestamped

my take on a timestamping plugin for sequel

WHY?

The existing implementations I saw checked for the attributes every time a record was saved. This version checks when plugged in.

Additionally, the updated_by attribute is explicitly settable in at least one other implementation. It's not in this one (by design).

Installation

Run the following if you haven't already:

$ gem sources -a http://gems.github.com

Install the gem(s):

$ sudo gem install -r sbfaulkner-sequel_timestamped

Example

require 'rubygems'
require 'sequel'

class Post < Sequel::Model
  is :timestamped, :using => :utc
end

UPDATES

1.0.4

  • [foca] define callback methods instead of using deprecated api

1.0.3

  • add support for utc (or localtime) by passing option :using => :utc (or :localtime)

TODO

  • maybe rename sequel_audited
  • add created_by and updated_by support?
  • publish in sequel www/pages/plugins

Legal

Author: S. Brent Faulkner brentf@unwwwired.net License: Copyright © 2009 unwwwired.net, released under the MIT license