module Shrine::Plugins::Derivatives::VersionsCompatibility

  1. lib/shrine/plugins/derivatives.rb

Adds compatibility with how the versions plugin stores processed files.

Methods

Public Instance

  1. load_data

Public Instance methods

load_data(data)
[show source]
    # File lib/shrine/plugins/derivatives.rb
630 def load_data(data)
631   return super if data.nil?
632   return super if data["derivatives"] || data[:derivatives]
633   return super if (data["id"] || data[:id]).is_a?(String)
634 
635   data     = data.dup
636   original = data.delete("original") || data.delete(:original) || {}
637 
638   super original.merge("derivatives" => data)
639 end