app/models/unidom/visitor/concerns/as_party.rb in unidom-visitor-1.7 vs app/models/unidom/visitor/concerns/as_party.rb in unidom-visitor-1.8
- old
+ new
@@ -8,9 +8,19 @@
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