app/models/oa2c/oauth2_token.rb in oa2c-0.0.1 vs app/models/oa2c/oauth2_token.rb in oa2c-0.0.2
- old
+ new
@@ -7,10 +7,10 @@
self.default_lifetime = 15.minutes
field :token
field :expires_at, type: Time
- belongs_to :user
+ belongs_to :user, class_name: Oa2c.user_model
belongs_to :client
before_validation :setup, on: :create
validates :client, :expires_at, presence: true
validates :token, presence: true, uniqueness: true