app/models/openstax/accounts/account.rb in openstax_accounts-7.3.0 vs app/models/openstax/accounts/account.rb in openstax_accounts-7.4.0
- old
+ new
@@ -22,11 +22,13 @@
enum faculty_status: [:no_faculty_info, :pending_faculty,
:confirmed_faculty, :rejected_faculty]
after_initialize :set_default_faculty_status
-
validates :faculty_status, presence: true
+
+ enum role: [:unknown_role, :student, :instructor, :administrator, :librarian, :designer, :other]
+ validates :role, presence: true
validates :openstax_uid, uniqueness: { allow_nil: true }
validates :username, uniqueness: { allow_nil: true }
before_update :update_openstax_accounts, if: :should_send_updates_to_accounts?