summaryrefslogtreecommitdiff
path: root/app/models/label.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/label.rb')
-rw-r--r--app/models/label.rb19
1 files changed, 12 insertions, 7 deletions
diff --git a/app/models/label.rb b/app/models/label.rb
index 220da10a6ab..07a1db4abe5 100644
--- a/app/models/label.rb
+++ b/app/models/label.rb
@@ -2,13 +2,14 @@
#
# Table name: labels
#
-# id :integer not null, primary key
-# title :string(255)
-# color :string(255)
-# project_id :integer
-# created_at :datetime
-# updated_at :datetime
-# template :boolean default(FALSE)
+# id :integer not null, primary key
+# title :string(255)
+# color :string(255)
+# project_id :integer
+# created_at :datetime
+# updated_at :datetime
+# template :boolean default(FALSE)
+# description :string(255)
#
class Label < ActiveRecord::Base
@@ -85,6 +86,10 @@ class Label < ActiveRecord::Base
issues.opened.count
end
+ def closed_issues_count
+ issues.closed.count
+ end
+
def template?
template
end