Sha256: d12981b7e9e995487f6069ae962a907ed80a9208cc3098bbd293ac22ddc6cb25
Contents?: true
Size: 722 Bytes
Versions: 23
Compression:
Stored size: 722 Bytes
Contents
module ActiveScaffold module Helpers module ListColumnHelpers def active_scaffold_column_carrierwave(record, column) carrierwave = record.send(column.name.to_s) return nil if carrierwave.file.blank? thumbnail_style = ActiveScaffold::Bridges::Carrierwave::CarrierwaveBridgeHelpers.thumbnail_style content = if carrierwave.versions.keys.include?(thumbnail_style) image_tag(carrierwave.url(thumbnail_style), :border => 0) else record.send(record.send(:_mounter, column.name).send(:serialization_column)) end link_to(content, carrierwave.url, :target => '_blank', rel: 'noopener noreferrer') end end end end
Version data entries
23 entries across 23 versions & 1 rubygems