Sha256: 52e5ef5dd681162ce6e8a48c22c924d098e126e9d0fad25b6d1c47b66c39ef29
Contents?: true
Size: 348 Bytes
Versions: 4
Compression:
Stored size: 348 Bytes
Contents
require 'has_token_on/models/base' require 'mongoid' module HasTokenOn module Mongoid extend ActiveSupport::Concern include HasTokenOn::Base private def token_is_nonunique?(token) self.class.first(:conditions => { token => self[token] }).present? end end end ::Mongoid::Document.send :include, HasTokenOn::Mongoid
Version data entries
4 entries across 4 versions & 1 rubygems