app/models/user.rb in hackathon_manager-0.9.2 vs app/models/user.rb in hackathon_manager-0.10.0
- old
+ new
@@ -1,10 +1,16 @@
class User < ApplicationRecord
devise :database_authenticatable, :registerable, :timeoutable,
:recoverable, :rememberable, :trackable, :validatable,
- :omniauthable, omniauth_providers: [:mlh]
+ :doorkeeper, :omniauthable, omniauth_providers: [:mlh]
has_one :questionnaire
+ has_many :access_grants, class_name: "Doorkeeper::AccessGrant",
+ foreign_key: :resource_owner_id,
+ dependent: :delete_all # or :destroy if you need callbacks
+ has_many :access_tokens, class_name: "Doorkeeper::AccessToken",
+ foreign_key: :resource_owner_id,
+ dependent: :delete_all # or :destroy if you need callbacks
after_create :queue_reminder_email
def active_for_authentication?
true