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:
authorCindy Pallares <cindy@gitlab.com>2018-10-19 19:36:41 +0300
committerCindy Pallares <cindy@gitlab.com>2018-10-22 20:55:49 +0300
commitbe493207b069d832d5ecb97fb157df60fa58094f (patch)
tree9ce0c6d3f952c2fb0ae5d34d05f09f77f6dd1e6d /app/models
parent019701ce9e0675e2727dcced84d4c406a1592f96 (diff)
Alias the lfs_enabled method
We currently check for `project.lfs_enabled` to display the state of lfs being enabled/disabled, but this is set to nil by default, even when lfs is enabled. Aliasing the method to #lfs_enabled? will return the correct state.
Diffstat (limited to 'app/models')
-rw-r--r--app/models/project.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 086f256174f..1967f5e2427 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -548,6 +548,8 @@ class Project < ActiveRecord::Base
self[:lfs_enabled] && Gitlab.config.lfs.enabled
end
+ alias_method :lfs_enabled, :lfs_enabled?
+
def auto_devops_enabled?
if auto_devops&.enabled.nil?
has_auto_devops_implicitly_enabled?