Module: StandardId::AccountAssociations
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/models/concerns/standard_id/account_associations.rb
Instance Method Summary collapse
-
#email_identifier ⇒ StandardId::EmailIdentifier?
Returns the account's StandardId::EmailIdentifier, if any.
-
#phone_number_identifier ⇒ StandardId::PhoneNumberIdentifier?
Returns the account's StandardId::PhoneNumberIdentifier, if any.
-
#username_identifier ⇒ StandardId::UsernameIdentifier?
Returns the account's StandardId::UsernameIdentifier, if any.
Instance Method Details
#email_identifier ⇒ StandardId::EmailIdentifier?
Returns the account's StandardId::EmailIdentifier, if any.
Uses the in-memory collection when identifiers is already loaded to avoid issuing an extra query (N+1 safety). Falls back to a scoped query otherwise.
35 36 37 |
# File 'app/models/concerns/standard_id/account_associations.rb', line 35 def email_identifier typed_identifier(StandardId::EmailIdentifier) end |
#phone_number_identifier ⇒ StandardId::PhoneNumberIdentifier?
Returns the account's StandardId::PhoneNumberIdentifier, if any.
42 43 44 |
# File 'app/models/concerns/standard_id/account_associations.rb', line 42 def phone_number_identifier typed_identifier(StandardId::PhoneNumberIdentifier) end |
#username_identifier ⇒ StandardId::UsernameIdentifier?
Returns the account's StandardId::UsernameIdentifier, if any.
49 50 51 |
# File 'app/models/concerns/standard_id/account_associations.rb', line 49 def username_identifier typed_identifier(StandardId::UsernameIdentifier) end |