summaryrefslogtreecommitdiff
path: root/app/models/project.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb44
1 files changed, 22 insertions, 22 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 5b59f227c87..30b534315c5 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -1,3 +1,24 @@
+# == Schema Information
+#
+# Table name: projects
+#
+# id :integer not null, primary key
+# name :string(255)
+# path :string(255)
+# description :text
+# created_at :datetime not null
+# updated_at :datetime not null
+# private_flag :boolean default(TRUE), not null
+# code :string(255)
+# owner_id :integer
+# default_branch :string(255)
+# issues_enabled :boolean default(TRUE), not null
+# wall_enabled :boolean default(TRUE), not null
+# merge_requests_enabled :boolean default(TRUE), not null
+# wiki_enabled :boolean default(TRUE), not null
+# group_id :integer
+#
+
require "grit"
class Project < ActiveRecord::Base
@@ -26,6 +47,7 @@ class Project < ActiveRecord::Base
has_many :wikis, dependent: :destroy
has_many :protected_branches, dependent: :destroy
has_one :last_event, class_name: 'Event', order: 'events.created_at DESC', foreign_key: 'project_id'
+ has_many :services, dependent: :destroy
delegate :name, to: :owner, allow_nil: true, prefix: true
@@ -163,25 +185,3 @@ class Project < ActiveRecord::Base
issues.tag_counts_on(:labels)
end
end
-
-# == Schema Information
-#
-# Table name: projects
-#
-# id :integer not null, primary key
-# name :string(255)
-# path :string(255)
-# description :text
-# created_at :datetime not null
-# updated_at :datetime not null
-# private_flag :boolean default(TRUE), not null
-# code :string(255)
-# owner_id :integer
-# default_branch :string(255)
-# issues_enabled :boolean default(TRUE), not null
-# wall_enabled :boolean default(TRUE), not null
-# merge_requests_enabled :boolean default(TRUE), not null
-# wiki_enabled :boolean default(TRUE), not null
-# group_id :integer
-#
-