Sha256: 6ee3fb26b7d9f78e45045d5feab441df614a3ddcfddc2cc207d295345258e1da

Contents?: true

Size: 1.1 KB

Versions: 1

Compression:

Stored size: 1.1 KB

Contents

sequel_bitemporal
=================

[![Build Status](https://travis-ci.org/TalentBox/sequel_bitemporal.png?branch=master)](https://travis-ci.org/TalentBox/sequel_bitemporal)

Bitemporal versioning for sequel.

Dependencies
------------

* Ruby >= 1.9.2
* gem "sequel", "~> 3.30.0"

Usage
-----

* Declare bitemporality inside your model:

        class HotelPriceVersion < Sequel::Model
        end

        class HotelPrice < Sequel::Model
          plugin :bitemporal, version_class: HotelPriceVersion
        end

* You can now create a hotel price with bitemporal versions:

        price = HotelPrice.new
        price.update_attributes price: 18

* To show all versions:

        price.versions

* To get current version:

        price.current_version

* Look at the specs for more usage patterns.

Thanks
------

Thanks to Evgeniy L (fiscal-cliff on github) for his contributions:
- skip plugin initialization process if versions table does not exist

License
-------

sequel_bitemporal is Copyright © 2011 TalentBox SA. It is free software, and may be redistributed under the terms specified in the LICENSE file.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sequel_bitemporal-0.8.7 README.md