diff options
author | Pavel Shutsin <pshutsin@gitlab.com> | 2019-07-30 13:04:10 +0300 |
---|---|---|
committer | Pavel Shutsin <pshutsin@gitlab.com> | 2019-08-06 11:38:50 +0300 |
commit | 55320ff69579f2dbe4ded1a88e7ff377d7a2eae9 (patch) | |
tree | 59ce949404d551daf513470371863b016a0b475f | |
parent | 1cc87f503c524357f4edcb0f7fda2160aa88c816 (diff) | |
download | gitlab-ce-55320ff69579f2dbe4ded1a88e7ff377d7a2eae9.tar.gz |
Add inheritance flexibility to issuable collections
-rw-r--r-- | app/controllers/concerns/issuable_collections.rb | 5 |
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 |