summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-05-03 14:34:23 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-05-03 14:34:23 +0300
commit747232eeda7c79ea65a5c208399a6c72872ff4bc (patch)
treed6677286d072a0651547d18a8fe317686ed907ee /lib/api/helpers.rb
parenta7ddff87481138e43609bd12acbb76da2ec8dd7a (diff)
parent2c544d43c832e816614a9bef35e1899f34b4a53d (diff)
downloadgitlab-ce-747232eeda7c79ea65a5c208399a6c72872ff4bc.tar.gz
Merge branch 'api-iid' of https://github.com/jubianchi/gitlabhq into jubianchi-api-iid
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)