about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-03-14 17:49:13 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-03-14 17:49:13 +0100
commit6fec8afc3f91166930c8b4dfca441a5a70a24d5b (patch)
tree4cd02810b87de1dccf7b96630910921d76357921 /app/models
parent25d7c1b6eaf03ddaec892c82f7d93a128b79a872 (diff)
Bind oauth applications to users
Diffstat (limited to 'app/models')
-rw-r--r--app/models/user.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 038ff21c6..b17eabcc4 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -5,4 +5,6 @@ class User < ActiveRecord::Base
   accepts_nested_attributes_for :account
 
   validates :account, presence: true
+
+  has_many :oauth_applications, class_name: 'Doorkeeper::Application', as: :owner
 end