Sha256: f6d3507fb08392142383d1eefd57e3884673bf29c34ca07ad06a228ef6a9a95a
Contents?: true
Size: 531 Bytes
Versions: 39
Compression:
Stored size: 531 Bytes
Contents
module Shim extend ::ActiveSupport::Concern included do include ::Mongoid::Timestamps field :created_at, :type => DateTime end module ClassMethods def last(options={}) options.delete(:order) if options[:order] == "id" super(options) end def find_by_email(email) first(:conditions => { :email => email }) end end # overwrite equality (because some devise tests use this for asserting model equality) def ==(other) other.is_a?(self.class) && _id == other._id end end
Version data entries
39 entries across 34 versions & 6 rubygems