Class: UserAssociatedAccount
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- UserAssociatedAccount
- Defined in:
- app/models/user_associated_account.rb
Class Method Summary collapse
Class Method Details
.cleanup! ⇒ Object
6 7 8 9 10 |
# File 'app/models/user_associated_account.rb', line 6 def self.cleanup! # This happens when a user starts the registration flow, but doesn't complete it # Keeping the rows doesn't cause any technical issue, but we shouldn't store PII unless it's attached to a user self.where("user_id IS NULL AND updated_at < ?", 1.day.ago).delete_all end |