summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2017-03-01 21:23:00 +0100
committerToon Claes <toon@gitlab.com>2017-03-02 12:15:25 +0100
commita3fdd6acd27f5aa98f13e7a0083d0c3208003ccb (patch)
treee174834a5aaf50b0444f829e8a2cfd678e833455 /lib/api/helpers.rb
parentbc20fa9b02d5fea8f5781b6397af10f006983111 (diff)
downloadgitlab-ce-a3fdd6acd27f5aa98f13e7a0083d0c3208003ccb.tar.gz
Use string based `visibility` getter & setter
Add `visibility` & `visibility=` methods to the `Gitlab::VisibilityLevel` module so the `visibility_level` can be get/set with a string value.
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb8
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index 7a39c640c5a..72d2b320077 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -268,14 +268,6 @@ module API
projects.reorder(params[:order_by] => params[:sort])
end
- def map_visibility_level(attrs)
- visibility = attrs.delete(:visibility)
- if visibility
- attrs[:visibility_level] = Gitlab::VisibilityLevel.string_options[visibility]
- end
- attrs
- end
-
# file helpers
def uploaded_file(field, uploads_path)