Module: Cowtech::RubyOnRails::Models::Mongoid::Sequence

Extended by:
ActiveSupport::Concern
Defined in:
app/models/cowtech/ruby_on_rails/models/mongoid/sequence.rb

Overview

Include this module to add automatic sequence feature (also works for _id field, so SQL-Like autoincrement primary key can easily be simulated) usage: class KlassName

include Mongoid::Document
include Mongoid::Sequence

field :number, :type=>Integer
sequence :number

Defined Under Namespace

Modules: ClassMethods