app/models/unidom/visitor/authenticating.rb in unidom-visitor-1.11.2 vs app/models/unidom/visitor/authenticating.rb in unidom-visitor-1.12

- old
+ new

@@ -5,10 +5,11 @@ class Unidom::Visitor::Authenticating < Unidom::Visitor::ApplicationRecord self.table_name = 'unidom_authenticatings' include Unidom::Common::Concerns::ModelExtension + include ProgneTapera::EnumCode belongs_to :visitor, polymorphic: true belongs_to :credential, polymorphic: true scope :visitor_is, ->(visitor) { where visitor: visitor } @@ -18,7 +19,9 @@ scope :credential_type_is, ->(credential_type) { where credential_type: credential_type } def self.authenticate!(visitor, with: nil, opened_at: Time.now) credential_is(with).visitor_is(visitor).valid_at.alive.first_or_create! opened_at: opened_at end + + code :flag, Unidom::Visitor::Flag end