Sha256: 6dede26b956bc8bb92c4f27e7c74cdbf0c8791c0eeb34569c604f0ff1781c5e6

Contents?: true

Size: 705 Bytes

Versions: 1

Compression:

Stored size: 705 Bytes

Contents

Mongoid Activity
============

Mongoid Activity is a simple gem to include active state to your Mongoid models.

Installation
--------

In your Gemfile:

    source 'http://rubygems.org'
    
    gem 'mongoid_activity'
  
Then:
  
    bundle install

Examples
--------

    class Task
      include Mongoid::Document
      include Mongoid::Activity
      
      field :description
    end

After that you gain activity methods:
    
    t = Task.create :description => "Finish mongoid_activity gem"
    t.activate!
    => true
    t.active?
    => true
    t.deactivate!
    => true
    t.inactive?
    => true
    t.active?
    => false
    Product.active.size
    => 0
    Product.inactive.size
    => 1

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mongoid_activity-0.0.2 README.md