summaryrefslogtreecommitdiff
path: root/app/models/runner.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-06-03 19:46:59 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-06-03 19:46:59 +0300
commitd7204d73a9ad0ea44fb1a2b51e6944c0461a2c39 (patch)
tree93b9f7a01894379b72e090fe56459caf38a495c1 /app/models/runner.rb
parent94ae27312ad5816e8efc8d228faceb1d144e98ae (diff)
downloadgitlab-ci-d7204d73a9ad0ea44fb1a2b51e6944c0461a2c39.tar.gz
You should add runners to project. WHen runner added -> deploy key for runner added to gitlab project
Diffstat (limited to 'app/models/runner.rb')
-rw-r--r--app/models/runner.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/models/runner.rb b/app/models/runner.rb
index 2bf086f..f87838f 100644
--- a/app/models/runner.rb
+++ b/app/models/runner.rb
@@ -1,5 +1,19 @@
+# == Schema Information
+#
+# Table name: runners
+#
+# id :integer not null, primary key
+# token :string(255)
+# public_key :text
+# created_at :datetime not null
+# updated_at :datetime not null
+#
+
class Runner < ActiveRecord::Base
has_many :builds
+ has_many :runner_projects, dependent: :destroy
+ has_many :projects, through: :runner_projects
+
has_one :last_build, class_name: 'Build'
attr_accessible :token, :public_key