diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-06-07 00:22:28 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-06-07 22:31:05 +0300 |
commit | eee712c82f642320922b9e99e9034a2ce6464591 (patch) | |
tree | 368ea1830796c90b64f44a1423e8ecc4f93923dd /app/models | |
parent | fc1090d9f39231e31f929e37b9703db9738b457c (diff) |
Empty blob viewer isn’t binary-only
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/blob.rb | 2 | ||||
-rw-r--r-- | app/models/blob_viewer/empty.rb | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/app/models/blob.rb b/app/models/blob.rb index 6a42a12891c..bba23bbb7e0 100644 --- a/app/models/blob.rb +++ b/app/models/blob.rb @@ -176,7 +176,7 @@ class Blob < SimpleDelegator end def rendered_as_text?(ignore_errors: true) - simple_viewer.text? && (ignore_errors || simple_viewer.render_error.nil?) + simple_viewer.is_a?(BlobViewer::Text) && (ignore_errors || simple_viewer.render_error.nil?) end def show_viewer_switcher? diff --git a/app/models/blob_viewer/empty.rb b/app/models/blob_viewer/empty.rb index d9d128eb273..2380578ed72 100644 --- a/app/models/blob_viewer/empty.rb +++ b/app/models/blob_viewer/empty.rb @@ -4,6 +4,5 @@ module BlobViewer include ServerSide self.partial_name = 'empty' - self.binary = true end end |