Add inheritance flexibility to issuable collections

This commit is contained in:
Pavel Shutsin 2019-07-30 13:04:10 +03:00
parent 1cc87f503c
commit 55320ff695
1 changed files with 2 additions and 3 deletions

View File

@ -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