summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
diff options
context:
space:
mode:
authorjubianchi <contact@jubianchi.fr>2015-01-17 23:45:39 +0100
committerjubianchi <contact@jubianchi.fr>2015-05-02 10:44:52 +0200
commit2c544d43c832e816614a9bef35e1899f34b4a53d (patch)
tree62251a13a44a9e6aa3e370a41e418a2b0018dd78 /lib/api/helpers.rb
parent76f7bdccc09fe1290cee330480c1a2640e3b20d5 (diff)
downloadgitlab-ce-2c544d43c832e816614a9bef35e1899f34b4a53d.tar.gz
Query issues, merge requests and milestones with their IID through API
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 be133a2920b..85e9081680d 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -173,6 +173,10 @@ module API
end
end
+ def filter_by_iid(items, iid)
+ items.where(iid: iid)
+ end
+
# error helpers
def forbidden!(reason = nil)