summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Shutsin <pshutsin@gitlab.com>2019-07-30 13:04:10 +0300
committerPavel Shutsin <pshutsin@gitlab.com>2019-08-06 11:38:50 +0300
commit55320ff69579f2dbe4ded1a88e7ff377d7a2eae9 (patch)
tree59ce949404d551daf513470371863b016a0b475f
parent1cc87f503c524357f4edcb0f7fda2160aa88c816 (diff)
downloadgitlab-ce-55320ff69579f2dbe4ded1a88e7ff377d7a2eae9.tar.gz
Add inheritance flexibility to issuable collections
-rw-r--r--app/controllers/concerns/issuable_collections.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/controllers/concerns/issuable_collections.rb b/app/controllers/concerns/issuable_collections.rb
index 21b3949e361..3489ea78b77 100644
--- a/app/controllers/concerns/issuable_collections.rb
+++ b/app/controllers/concerns/issuable_collections.rb
@@ -194,10 +194,9 @@ module IssuableCollections
end
def collection_type
- @collection_type ||= case finder_type.name
- when 'IssuesFinder'
+ @collection_type ||= if finder_type <= IssuesFinder
'Issue'
- when 'MergeRequestsFinder'
+ elsif finder_type <= MergeRequestsFinder
'MergeRequest'
end
end