summaryrefslogtreecommitdiff
path: root/app/models/runner.rb
diff options
context:
space:
mode:
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