summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-03-02 10:18:02 +0000
committerRémy Coutable <remy@rymai.me>2017-03-02 10:18:02 +0000
commit034c64968224caafaa3aec904359bf82cce36f7a (patch)
treec71e679bc09d443e48e87cec80cd5740082aadd2 /lib/api/helpers.rb
parentd4154195329b0a823848df8ceae144aebd6ccf6b (diff)
parent61baf3528d2f39ffc8f7aa07eddf3df0cec3508b (diff)
downloadgitlab-ce-034c64968224caafaa3aec904359bf82cce36f7a.tar.gz
Merge branch '28807-search-for-milestone-by-title-in-rest-api' into 'master'
Enable filtering milestones by search criteria in the API Closes #28807 See merge request !9606
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb4
1 files changed, 4 insertions, 0 deletions
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)