Commit c0bf3615 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

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

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
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