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.
22 23 24 |
# File 'app/models/concerns/standard_id/account_associations.rb', line 22 def email_identifier typed_identifier(StandardId::EmailIdentifier) end |
#phone_number_identifier ⇒ StandardId::PhoneNumberIdentifier?
Returns the account’s StandardId::PhoneNumberIdentifier, if any.
29 30 31 |
# File 'app/models/concerns/standard_id/account_associations.rb', line 29 def phone_number_identifier typed_identifier(StandardId::PhoneNumberIdentifier) end |
#username_identifier ⇒ StandardId::UsernameIdentifier?
Returns the account’s StandardId::UsernameIdentifier, if any.
36 37 38 |
# File 'app/models/concerns/standard_id/account_associations.rb', line 36 def username_identifier typed_identifier(StandardId::UsernameIdentifier) end |