Sha256: fb1c13b199704d988c6b066fbc57479d6dd8e1ce0e7b9efc2886bdb15d62fb83
Contents?: true
Size: 696 Bytes
Versions: 3
Compression:
Stored size: 696 Bytes
Contents
module Unidom::Visitor::Concerns::AsParty extend ActiveSupport::Concern included do |includer| has_many :recognizations, class_name: 'Unidom::Visitor::Recognization', as: :party def is_cognized!(via: nil, at: Time.now, primary: true) recognizations.create! visitor: via, elemental: primary, opened_at: at end =begin def is_cognized?(via: nil, at: Time.now, primary: true) query = recognizations query = query.visitor_is via if via.present? query = query.primary primary unless primary.nil? query = query.valid_at now: at if at.present? query = query.alive.exists? end =end end module ClassMethods end end
Version data entries
3 entries across 3 versions & 1 rubygems