Class: DiffViewer::Image
- Includes:
- ClientSide, Rich
- Defined in:
- app/models/diff_viewer/image.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Methods inherited from Base
binary?, #binary_detected_after_load?, can_render_blob?, #collapsed?, #initialize, partial_path, #prepare!, #render_error, #render_error_message, rich?, simple?, text?, #too_large?
Constructor Details
This class inherits a constructor from DiffViewer::Base
Class Method Details
.can_render?(diff_file, verify_binary: true) ⇒ Boolean
14 15 16 17 18 19 20 |
# File 'app/models/diff_viewer/image.rb', line 14 def self.can_render?(diff_file, verify_binary: true) # When both blobs are missing, we often still have a textual diff that can # be displayed return false if diff_file.old_blob.nil? && diff_file.new_blob.nil? super end |