Class: Account
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Account
- Defined in:
- app/models/account.rb
Overview
Account’s purpose is to correlate unique identifiers, and to remove our dependency on third party services for a user’s unique identifier.
The account.uuid is intended to become the Vets-API user’s uuid.
Class Method Summary collapse
Methods inherited from ApplicationRecord
descendants_using_encryption, lockbox_options, #timestamp_attributes_for_update_in_model, #valid?
Class Method Details
.lookup_by_user_account_uuid(user_uuid) ⇒ Object
62 63 64 65 66 67 |
# File 'app/models/account.rb', line 62 def self.lookup_by_user_account_uuid(user_uuid) user_account = UserAccount.find_by(id: user_uuid) return unless user_account&.icn Account.where(icn: user_account.icn).first end |