summaryrefslogtreecommitdiff
path: root/app/models/milestone.rb
diff options
context:
space:
mode:
authorDylan Griffith <dyl.griffith@gmail.com>2019-10-17 16:15:07 +1100
committerDylan Griffith <dyl.griffith@gmail.com>2019-10-23 11:29:14 +1100
commit920c7a4abe28dac1d1b26098ece2d912c01d9584 (patch)
treeb920b2f8a8d074fb9a33264e26910991c9918246 /app/models/milestone.rb
parent0df265b6600c12fb6ed3d068e92e8e2b3ddf0dab (diff)
downloadgitlab-ce-920c7a4abe28dac1d1b26098ece2d912c01d9584.tar.gz
Add #to_ability_name to Project & Milestone
This will be used later for search filtering.
Diffstat (limited to 'app/models/milestone.rb')
-rw-r--r--app/models/milestone.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/milestone.rb b/app/models/milestone.rb
index 2fa0cfc9b93..a9f4cdec901 100644
--- a/app/models/milestone.rb
+++ b/app/models/milestone.rb
@@ -261,6 +261,10 @@ class Milestone < ApplicationRecord
group || project
end
+ def to_ability_name
+ model_name.singular
+ end
+
def group_milestone?
group_id.present?
end