Sha256: 4299479100b7bb140bb125b1ea6e8c004d59baebe68e8cfdd173fe02894994a4
Contents?: true
Size: 691 Bytes
Versions: 24
Compression:
Stored size: 691 Bytes
Contents
module ActiveScaffold module Helpers module ListColumnHelpers def active_scaffold_column_carrierwave(record, column) carrierwave = record.send("#{column.name}") return nil unless !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).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
24 entries across 24 versions & 1 rubygems