diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-06-09 10:10:44 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-06-09 10:10:44 +0000 |
commit | 66aad16d1aaa426237e52ef19385385566f194dc (patch) | |
tree | 47784b6a677d4f8d1fd82bc435e0ea6c9380d775 /app/models/blob.rb | |
parent | 288e8c7c42bd9507725637dcf7e5b8e0eaa5229c (diff) | |
parent | 370bc86fb007c1683495bdf4082bf5442b517895 (diff) | |
download | gitlab-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.rb | 7 |
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 |