summaryrefslogtreecommitdiff
path: root/app/models/deploy_key.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-05-06 12:26:36 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-05-06 12:26:36 +0300
commit543d86f351780ebfd9bdd945e6cc247da4919602 (patch)
tree2327dcbd43fe84813c50dcc581e14ccb0b38223c /app/models/deploy_key.rb
parent53413f128d049a7f45e4b3daf3dd0c3408a777e9 (diff)
downloadgitlab-ce-543d86f351780ebfd9bdd945e6cc247da4919602.tar.gz
Create DeployKey & DeployKeysProject models. Bulding many to many relation between deploy keys and projects
Diffstat (limited to 'app/models/deploy_key.rb')
-rw-r--r--app/models/deploy_key.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/deploy_key.rb b/app/models/deploy_key.rb
new file mode 100644
index 00000000000..6d9ec9a47e4
--- /dev/null
+++ b/app/models/deploy_key.rb
@@ -0,0 +1,4 @@
+class DeployKey < Key
+ has_many :deploy_keys_projects, dependent: :destroy
+ has_many :projects, through: :deploy_keys_projects
+end