summaryrefslogtreecommitdiff
path: root/app/models/blob.rb
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-06-09 10:10:44 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-06-09 10:10:44 +0000
commit66aad16d1aaa426237e52ef19385385566f194dc (patch)
tree47784b6a677d4f8d1fd82bc435e0ea6c9380d775 /app/models/blob.rb
parent288e8c7c42bd9507725637dcf7e5b8e0eaa5229c (diff)
parent370bc86fb007c1683495bdf4082bf5442b517895 (diff)
downloadgitlab-ce-66aad16d1aaa426237e52ef19385385566f194dc.tar.gz
Merge branch 'dm-blob-binaryness-change' into 'master'
Detect if blob binaryness changes after loading all data See merge request !11981
Diffstat (limited to 'app/models/blob.rb')
-rw-r--r--app/models/blob.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/models/blob.rb b/app/models/blob.rb
index 3869e79ba75..954d4e4d779 100644
--- a/app/models/blob.rb
+++ b/app/models/blob.rb
@@ -191,9 +191,12 @@ class Blob < SimpleDelegator
rendered_as_text? && rich_viewer
end
+ def expanded?
+ !!@expanded
+ end
+
def expand!
- simple_viewer&.expanded = true
- rich_viewer&.expanded = true
+ @expanded = true
end
private