Skip to content
Snippets Groups Projects
Commit c0bf3615 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Move search param check into own method in app/finders/labels_finder.rb

parent 8e8cb5b9
No related branches found
No related tags found
1 merge request!10495Merge Requests - Assignee
Loading
Loading
@@ -65,7 +65,7 @@ class LabelsFinder < UnionFinder
end
 
def by_search(labels)
return labels unless params[:search].present?
return labels unless search?
 
labels.search(params[:search])
end
Loading
Loading
@@ -113,6 +113,10 @@ class LabelsFinder < UnionFinder
params[:only_group_labels]
end
 
def search?
params[:search].present?
end
def title
params[:title] || params[:name]
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment