Sha256: 803c69292ee4343a946278e5e8950d0dbf55689d995f62515fade2c33229b238
Contents?: true
Size: 705 Bytes
Versions: 13
Compression:
Stored size: 705 Bytes
Contents
require 'smithy/dragonfly/asset_helper' require 'smithy/dragonfly/remote_data_store' module Smithy module Dragonfly def self.resize_url(source, resize_string) file = nil if source.is_a?(String) source.strip! if source =~ /^http/ file = self.app.fetch_url(source) else file = self.app.fetch_file(File.join('public', source)) end elsif source.respond_to?(:url) # dragonfly uploader file = source else Smithy.log :error, "Unable to resize on the fly: #{source.inspect}" return end file.process(:thumb, resize_string).url end def self.app ::Dragonfly.app end end end
Version data entries
13 entries across 13 versions & 1 rubygems