diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-05-26 18:27:30 -0500 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-05-29 17:02:02 -0500 |
commit | aed0387f97ec62b184da90bdca0ce40f9dc58b45 (patch) | |
tree | 54223237527ddbcaa93bfea552f2fda2b6c1c61f /app/models/blob.rb | |
parent | 1ac12698c613774bdace72475573916c142a07e4 (diff) | |
download | gitlab-ce-aed0387f97ec62b184da90bdca0ce40f9dc58b45.tar.gz |
Consistent diff and blob size limit names
Diffstat (limited to 'app/models/blob.rb')
-rw-r--r-- | app/models/blob.rb | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/app/models/blob.rb b/app/models/blob.rb index e75926241ba..6a42a12891c 100644 --- a/app/models/blob.rb +++ b/app/models/blob.rb @@ -102,10 +102,6 @@ class Blob < SimpleDelegator raw_size == 0 end - def too_large? - size && truncated? - end - def external_storage_error? if external_storage == :lfs !project&.lfs_enabled? @@ -160,7 +156,7 @@ class Blob < SimpleDelegator end def readable_text? - text? && !stored_externally? && !too_large? + text? && !stored_externally? && !truncated? end def simple_viewer @@ -187,9 +183,9 @@ class Blob < SimpleDelegator rendered_as_text? && rich_viewer end - def override_max_size! - simple_viewer&.override_max_size = true - rich_viewer&.override_max_size = true + def expand! + simple_viewer&.expanded = true + rich_viewer&.expanded = true end private |