class Mongoid::Fields::Standard

def object_id_field?

Returns:
  • (true | false) - If the field is a BSON::ObjectId.

Other tags:
    Example: Is the field a BSON::ObjectId? -
def object_id_field?
  @object_id_field ||= (type == BSON::ObjectId)
end