Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Fletcher <mark@gitlab.com>2017-02-28 15:23:40 +0300
committerMark Fletcher <mark@gitlab.com>2017-03-02 07:37:57 +0300
commit61baf3528d2f39ffc8f7aa07eddf3df0cec3508b (patch)
treed3830021e7dbe0b16071776e39578ffff2c3be1d /lib/api/helpers.rb
parent7733f285aca97d444382a59eda0ea3e303539c26 (diff)
Enable filtering milestones by search criteria in the API
- Also remove a redundant test
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)