app/models/devise/oauth2/client.rb in devise_oauth2_rails4-1.1.7 vs app/models/devise/oauth2/client.rb in devise_oauth2_rails4-1.1.8
- old
+ new
@@ -2,9 +2,11 @@
has_many :access_tokens
has_many :refresh_tokens
has_many :authorization_codes
+ belongs_to :owner, polymorphic: true
+
before_validation :init_identifier, :on => :create, :unless => :identifier?
before_validation :init_secret, :on => :create, :unless => :secret?
validates :identifier, :presence => true, :uniqueness => true
serialize :default_permissions