Sha256: 870681645196a40abf1a92bc086ab1950cc579bc7466171742cc703a2de0013b
Contents?: true
Size: 696 Bytes
Versions: 47
Compression:
Stored size: 696 Bytes
Contents
module ActiveScaffold module Helpers module ListColumnHelpers def active_scaffold_column_carrierwave(column, record) carrierwave = record.send("#{column.name}") return nil unless !carrierwave.file.blank? thumbnail_style = ActiveScaffold::Bridges::Carrierwave::Lib::CarrierwaveBridgeHelpers.thumbnail_style content = if carrierwave.versions.keys.include?(thumbnail_style) image_tag(carrierwave.url(thumbnail_style), :border => 0).html_safe else record.send(record.send(:_mounter, column.name).send(:serialization_column)) end link_to(content, carrierwave.url, :target => '_blank') end end end end
Version data entries
47 entries across 47 versions & 4 rubygems