Sha256: 657f3feabbe68781eab6754fb2b33c410524de9a80aaf9cc5fd21574dadba5b4
Contents?: true
Size: 569 Bytes
Versions: 1
Compression:
Stored size: 569 Bytes
Contents
module Unidom::Visitor::Concerns::AsIdentity extend ActiveSupport::Concern included do |includer| has_many :identificatings, class_name: 'Unidom::Visitor::Identificating', as: :identity def identificate!(it, at: Time.now) identificatings.create! visitor: it, opened_at: at end =begin def identificate?(it, at: Time.now) query = identificatings query = query.visitor_is it if it.present? query = query.valid_at now: at if at.present? query.alive.exists? end =end end module ClassMethods end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
unidom-visitor-1.8 | app/models/unidom/visitor/concerns/as_identity.rb |