summaryrefslogtreecommitdiff
path: root/app/models/project_feature.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-02 09:05:53 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-02 09:05:53 +0000
commit95793b2325f6a9add2395d89447bd0e64b870cd1 (patch)
treeb16717b39c378af5cf9356dbe0eea1cad2cfc67c /app/models/project_feature.rb
parent404bb44ef7dfc2b0d4da6b946b8b96007aca4b56 (diff)
downloadgitlab-ce-95793b2325f6a9add2395d89447bd0e64b870cd1.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/project_feature.rb')
-rw-r--r--app/models/project_feature.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/project_feature.rb b/app/models/project_feature.rb
index 13b20b1fead..2013f620b5b 100644
--- a/app/models/project_feature.rb
+++ b/app/models/project_feature.rb
@@ -62,7 +62,8 @@ class ProjectFeature < ApplicationRecord
private
def ensure_feature!(feature)
- feature = feature.model_name.plural.to_sym if feature.respond_to?(:model_name)
+ feature = feature.model_name.plural if feature.respond_to?(:model_name)
+ feature = feature.to_sym
raise ArgumentError, "invalid project feature: #{feature}" unless FEATURES.include?(feature)
feature