Commit c0bf3615 authored by Dmytro Zaporozhets's avatar Dmytro Zaporozhets

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

Signed-off-by: Dmytro Zaporozhets's avatarDmitriy Zaporozhets <[email protected]>
parent 8e8cb5b9
......@@ -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
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment