Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZ.J. van de Weg <git@zjvandeweg.nl>2016-11-12 13:18:33 +0300
committerZ.J. van de Weg <git@zjvandeweg.nl>2016-11-12 13:20:06 +0300
commit9869c480973a179a51aec79fcd5373e882195b1b (patch)
treeb94b5a46df44f6df9661552d021487bf49d0d07e /app/models/project_feature.rb
parent6eeff67c6e03233d4480a55d05d4e0f1a88aef4c (diff)
Remove unneeded nil checks
The library we're using, default_value_for, is configured to interpret nil as the default value, being ENABLED. Given the property can't be nil this check is unneeded.
Diffstat (limited to 'app/models/project_feature.rb')
-rw-r--r--app/models/project_feature.rb6
1 files changed, 0 insertions, 6 deletions
diff --git a/app/models/project_feature.rb b/app/models/project_feature.rb
index 34fd5a57b5e..5c53c8f1ee5 100644
--- a/app/models/project_feature.rb
+++ b/app/models/project_feature.rb
@@ -49,20 +49,14 @@ class ProjectFeature < ActiveRecord::Base
end
def builds_enabled?
- return true unless builds_access_level
-
builds_access_level > DISABLED
end
def wiki_enabled?
- return true unless wiki_access_level
-
wiki_access_level > DISABLED
end
def merge_requests_enabled?
- return true unless merge_requests_access_level
-
merge_requests_access_level > DISABLED
end