diff options
author | Mark Fletcher <mark@gitlab.com> | 2017-02-28 15:23:40 +0300 |
---|---|---|
committer | Mark Fletcher <mark@gitlab.com> | 2017-03-02 07:37:57 +0300 |
commit | 61baf3528d2f39ffc8f7aa07eddf3df0cec3508b (patch) | |
tree | d3830021e7dbe0b16071776e39578ffff2c3be1d /lib/api/helpers.rb | |
parent | 7733f285aca97d444382a59eda0ea3e303539c26 (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.rb | 4 |
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) |