Class/Module Index [+]

Quicksearch

Mongoid::Keys

This module defines the behaviour for overriding the default ids on documents.

Attributes

identifier[R]

Public Instance Methods

primary_key() click to toggle source

Get the document’s primary key.

@note Refactored from using delegate for class load performance.

@example Get the primary key.

model.primary_key

@return [ Array ] The primary key

# File lib/mongoid/keys.rb, line 23
def primary_key
  self.class.primary_key
end
using_object_ids?() click to toggle source

Is the document using object ids?

@note Refactored from using delegate for class load performance.

@example Is the document using object ids?

model.using_object_ids?

@return [ true, false ] Using object ids.

# File lib/mongoid/keys.rb, line 35
def using_object_ids?
  self.class.using_object_ids?
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.