app/models/unidom/visitor/identificating.rb in unidom-visitor-0.7 vs app/models/unidom/visitor/identificating.rb in unidom-visitor-0.8
- old
+ new
@@ -18,6 +18,14 @@
def self.identificate(visitor, identity, opened_at: Time.now)
self.visitor_is(visitor).identity_is(identity).valid_at.alive.first_or_create opened_at: opened_at
end
+ def self.identificate!(visitor, as: nil, at: Time.now)
+ self.visitor_is(visitor).identity_is(as).valid_at.alive.first_or_create! opened_at: at
+ end
+
+ class << self
+ deprecate identificate: :identificate!, deprecator: ActiveSupport::Deprecation.new('1.0', 'unidom-visitor')
+ end
+
end