diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2019-10-17 16:15:07 +1100 |
---|---|---|
committer | Dylan Griffith <dyl.griffith@gmail.com> | 2019-10-23 11:29:14 +1100 |
commit | 920c7a4abe28dac1d1b26098ece2d912c01d9584 (patch) | |
tree | b920b2f8a8d074fb9a33264e26910991c9918246 /app/models/milestone.rb | |
parent | 0df265b6600c12fb6ed3d068e92e8e2b3ddf0dab (diff) | |
download | gitlab-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.rb | 4 |
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 |