Module: Shrine::Plugins::Derivatives::VersionsCompatibility
- Defined in:
- lib/shrine/plugins/derivatives.rb
Overview
Adds compatibility with how the versions plugin stores processed files.
Instance Method Summary collapse
Instance Method Details
#load_data(data) ⇒ Object
594 595 596 597 598 599 600 601 602 603 |
# File 'lib/shrine/plugins/derivatives.rb', line 594 def load_data(data) return super if data.nil? return super if data["derivatives"] || data[:derivatives] return super if (data["id"] || data[:id]).is_a?(String) data = data.dup original = data.delete("original") || data.delete(:original) || {} super original.merge("derivatives" => data) end |