module DoorkeeperMongodb::Mixins::Mongoid::BaseMixin::ClassMethods

Public Instance Methods

find_by(*args) click to toggle source
Calls superclass method
# File lib/doorkeeper-mongodb/mixins/mongoid/base_mixin.rb, line 14
def find_by(*args)
  super(*args)
rescue ::Mongoid::Errors::DocumentNotFound
  nil
end
ordered_by(attribute, direction = :asc) click to toggle source
# File lib/doorkeeper-mongodb/mixins/mongoid/base_mixin.rb, line 10
def ordered_by(attribute, direction = :asc)
  order_by(attribute => direction.to_sym)
end