From 9869c480973a179a51aec79fcd5373e882195b1b Mon Sep 17 00:00:00 2001 From: "Z.J. van de Weg" Date: Sat, 12 Nov 2016 11:18:33 +0100 Subject: 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. --- app/models/project_feature.rb | 6 ------ 1 file changed, 6 deletions(-) (limited to 'app/models/project_feature.rb') 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 -- cgit v1.2.3