Class: OpenStax::Accounts::Account
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- OpenStax::Accounts::Account
- Defined in:
- app/models/openstax/accounts/account.rb
Direct Known Subclasses
Constant Summary collapse
- USERNAME_DISCARDED_CHAR_REGEX =
/[^A-Za-z\d_]/
- USERNAME_MAX_LENGTH =
50
Instance Attribute Summary collapse
-
#syncing ⇒ Object
Returns the value of attribute syncing.
Instance Method Summary collapse
Instance Attribute Details
#syncing ⇒ Object
Returns the value of attribute syncing.
7 8 9 |
# File 'app/models/openstax/accounts/account.rb', line 7 def syncing @syncing end |
Instance Method Details
#casual_name ⇒ Object
37 38 39 |
# File 'app/models/openstax/accounts/account.rb', line 37 def casual_name first_name || username end |
#has_authenticated? ⇒ Boolean
45 46 47 |
# File 'app/models/openstax/accounts/account.rb', line 45 def has_authenticated? !access_token.nil? end |
#is_anonymous? ⇒ Boolean
41 42 43 |
# File 'app/models/openstax/accounts/account.rb', line 41 def is_anonymous? false end |
#name ⇒ Object
33 34 35 |
# File 'app/models/openstax/accounts/account.rb', line 33 def name (first_name || last_name) ? [first_name, last_name].compact.join(" ") : username end |