Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-02-25 16:26:41 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-03-03 12:41:11 +0300
commit7183a7da6dbe5d2faf2ae03dfe4652ca6ed6dfde (patch)
tree975454b3d1d464db7570486fbd60786ddaca7d71 /app/models/label.rb
parenta472c1bfd0b5c09e2c9b9da5ff0de3c90aaeda2f (diff)
Add additional text prefix in cross project labels
Diffstat (limited to 'app/models/label.rb')
-rw-r--r--app/models/label.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/label.rb b/app/models/label.rb
index c6abd6c9712..1bb4f35cea2 100644
--- a/app/models/label.rb
+++ b/app/models/label.rb
@@ -67,6 +67,7 @@ class Label < ActiveRecord::Base
nil
end
+ ##
# Returns the String necessary to reference this Label in Markdown
#
# format - Symbol format to use (default: :id, optional: :name)
@@ -78,6 +79,7 @@ class Label < ActiveRecord::Base
# Label.first.to_reference(project) # => "gitlab-org/gitlab-ce~1"
#
# Returns a String
+ #
def to_reference(from_project = nil, format: :id)
reference = label_format_reference(format)
@@ -88,7 +90,6 @@ class Label < ActiveRecord::Base
end
end
-
def open_issues_count
issues.opened.count
end