Module: MassiveRecord::ORM::IdFactory

Extended by:
ActiveSupport::Concern
Included in:
AtomicIncrementation, Timestamp
Defined in:
lib/massive_record/orm/id_factory.rb,
lib/massive_record/orm/id_factory/timestamp.rb,
lib/massive_record/orm/id_factory/atomic_incrementation.rb

Defined Under Namespace

Modules: ClassMethods Classes: AtomicIncrementation, Timestamp

Instance Method Summary collapse

Instance Method Details

#next_for(table) ⇒ Object

Returns a new and unique id for a given table name Table can a symbol, string or an object responding to table_name



25
26
27
28
# File 'lib/massive_record/orm/id_factory.rb', line 25

def next_for(table)
  table = table.respond_to?(:table_name) ? table.table_name : table.to_s
  next_id :table => table
end