mongoid-grid_fs
Go to file
2012-08-10 09:06:48 -06:00
lib first commit 2012-08-10 09:06:48 -06:00
test first commit 2012-08-10 09:06:48 -06:00
.gitignore v1.3.0 2012-07-24 21:17:05 -06:00
mongoid-grid_fs.gemspec update deps. v1.3.2 2012-07-27 09:11:20 -06:00
mongoid-sequence.gemspec first commit 2012-08-10 09:06:48 -06:00
Rakefile first commit 2012-08-10 09:06:48 -06:00
README.md first commit 2012-08-10 09:06:48 -06:00

NAME

mongoid-sequence

INSTALL

gem install mongoid-sequence

SYNOPSIS


  require 'mongoid'
  require 'mongoid-sequence'


  class Page
    include Mongoid::Document
    include Mongoid::Sequence

    sequence :number
  end

  p Page.create.number #=> 1
  p Page.create.number #=> 2
  p Page.create.number #=> 3


DESCRIPTION

mongoid_sequence is a pure mongoid sequence generator based on mongodb's increment operator