class Mongoid::Contextual::None

def first(limit = nil)

Returns:
  • ([] | nil) - Empty array or nil.

Parameters:
  • limit (Integer) -- The number of documents to return.

Other tags:
    Example: Get the first document in null context. -
def first(limit = nil)
  [] unless limit.nil?
end