diff options
author | Toon Claes <toon@gitlab.com> | 2017-03-01 16:16:29 +0100 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2017-03-02 09:33:24 +0100 |
commit | b2c2dfe545526a1857e9605761f6d256ef73e190 (patch) | |
tree | ba3ec9ea7ce38a4c2ca09b6d92a3d67bb492daf1 /app | |
parent | fc287191451bb6aac80d759ab521b5834d27df43 (diff) | |
download | gitlab-ce-b2c2dfe545526a1857e9605761f6d256ef73e190.tar.gz |
Expose Project's & ProjectSnippet's VisibilityLevel as String
Instead of exposing the VisibilityLevel as Integer, expose it as
String `visibility` for Project and ProjectSnippet.
Filter queries also accept the `visibility` as String instead of
`visibility_level` as Integer.
Also remove the `public` boolean.
Diffstat (limited to 'app')
-rw-r--r-- | app/models/project.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 0c2494d3c32..472736c48c4 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -334,7 +334,7 @@ class Project < ActiveRecord::Base end def search_by_visibility(level) - where(visibility_level: Gitlab::VisibilityLevel.const_get(level.upcase)) + where(visibility_level: Gitlab::VisibilityLevel.string_options[level]) end def search_by_title(query) |