module Model::ClassMethods

Public Instance Methods

find!( *args ) click to toggle source

Finds document by id. Raises error if document is not found.

# File lib/aerogel/core/db/model.rb, line 19
def find!( *args )
  raise_not_found_error_was = Mongoid.raise_not_found_error
  begin
    Mongoid.raise_not_found_error = true
    self.find( *args )
  ensure
    Mongoid.raise_not_found_error = raise_not_found_error_was
  end
end