diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-04-21 21:22:04 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-04-27 20:23:26 +0300 |
commit | c69a0779fb499fb3c8352eede0b5c6d7bb1117d1 (patch) | |
tree | 99e84300670eb85e7b414fc6f6891d3779f69b4e /app/models/blob_viewer | |
parent | fed9dcd9ed2f064e887332b4e45f2e65465e74c0 (diff) |
Address feedback
Diffstat (limited to 'app/models/blob_viewer')
-rw-r--r-- | app/models/blob_viewer/base.rb | 4 | ||||
-rw-r--r-- | app/models/blob_viewer/download.rb | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/app/models/blob_viewer/base.rb b/app/models/blob_viewer/base.rb index ce4f129232d..8e6919f1054 100644 --- a/app/models/blob_viewer/base.rb +++ b/app/models/blob_viewer/base.rb @@ -2,7 +2,7 @@ module BlobViewer class Base class_attribute :partial_name, :type, :extensions, :client_side, :text_based, :switcher_icon, :switcher_title, :max_size, :absolute_max_size - delegate :partial_path, :rich?, :simple?, :client_side?, :text_based?, to: :class + delegate :partial_path, :rich?, :simple?, :client_side?, :server_side?, :text_based?, to: :class attr_reader :blob @@ -26,7 +26,7 @@ module BlobViewer client_side end - def server_side? + def self.server_side? !client_side? end diff --git a/app/models/blob_viewer/download.rb b/app/models/blob_viewer/download.rb index e406cfc05f7..8f293ea6008 100644 --- a/app/models/blob_viewer/download.rb +++ b/app/models/blob_viewer/download.rb @@ -1,8 +1,9 @@ module BlobViewer class Download < Base include Simple - # We pretend the Download viewer is rendered client-side so that it doesn't - # attempt to load the entire blob contents. + # We treat the Download viewer as if it renders the content client-side, + # so that it doesn't attempt to load the entire blob contents and is + # rendered synchronously instead of loaded asynchronously. include ClientSide self.partial_name = 'download' |