From 61baf3528d2f39ffc8f7aa07eddf3df0cec3508b Mon Sep 17 00:00:00 2001 From: Mark Fletcher Date: Tue, 28 Feb 2017 17:53:40 +0530 Subject: Enable filtering milestones by search criteria in the API - Also remove a redundant test --- lib/api/helpers.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/api/helpers.rb') diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index 72d2b320077..4600abc7dc7 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -164,6 +164,10 @@ module API items.where(iid: iid) end + def filter_by_search(items, text) + items.search(text) + end + # error helpers def forbidden!(reason = nil) -- cgit v1.2.1