summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorPatricio Cano <suprnova32@gmail.com>2016-08-25 17:59:31 -0500
committerPatricio Cano <suprnova32@gmail.com>2016-08-30 16:17:41 -0500
commit63a97c11928d483cfad87d11f83c7df84c29743d (patch)
tree5e25c18e8489dec1000e5302b7ecf176166ce675 /app
parent0227e98d0db2eb7fc6a35ddfcd3a0581ab550948 (diff)
downloadgitlab-ce-63a97c11928d483cfad87d11f83c7df84c29743d.tar.gz
Syntax and style fixes.
Diffstat (limited to 'app')
-rw-r--r--app/models/project.rb5
-rw-r--r--app/views/projects/edit.html.haml2
2 files changed, 5 insertions, 2 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index c271448946c..7a5933bfe5e 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -391,7 +391,10 @@ class Project < ActiveRecord::Base
end
def lfs_enabled?
- (Gitlab.config.lfs.enabled && enable_lfs) || (enable_lfs.nil? && Gitlab.config.lfs.enabled)
+ return false unless Gitlab.config.lfs.enabled
+ return Gitlab.config.lfs.enabled if enable_lfs.nil?
+
+ enable_lfs
end
def repository_storage_path
diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml
index 8aa2db197a3..0c5ce193240 100644
--- a/app/views/projects/edit.html.haml
+++ b/app/views/projects/edit.html.haml
@@ -84,7 +84,7 @@
.form-group
.checkbox
= f.label :enable_lfs do
- = f.check_box :enable_lfs, checked: (true if @project.enable_lfs || @project.enable_lfs.nil?)
+ = f.check_box :enable_lfs, checked: @project.lfs_enabled?
%strong LFS
%br
%span.descr Git Large File Storage