app/models/casino/two_factor_authenticator.rb in casino-3.0.4 vs app/models/casino/two_factor_authenticator.rb in casino-4.0.0.pre.1

- old
+ new

@@ -1,8 +1,10 @@ class CASino::TwoFactorAuthenticator < ActiveRecord::Base belongs_to :user + scope :active, -> { where(active: true) } + def self.cleanup self.delete_all(['(created_at < ?) AND active = ?', self.lifetime.ago, false]) end def self.lifetime