Sha256: 4ea54cc293e46d58d3f37dfaf5e89b1daff7feec6c79c5e78801a75a038dcc32
Contents?: true
Size: 678 Bytes
Versions: 8
Compression:
Stored size: 678 Bytes
Contents
module ActiveScaffold module Helpers module ListColumnHelpers def active_scaffold_column_paperclip(record, column, ui_options: column.options) paperclip = record.send(column.name.to_s) return nil unless paperclip.file? content = if paperclip.styles.include?(ActiveScaffold::Bridges::Paperclip::PaperclipBridgeHelpers.thumbnail_style) image_tag(paperclip.url(ActiveScaffold::Bridges::Paperclip::PaperclipBridgeHelpers.thumbnail_style), :border => 0, :alt => nil) else paperclip.original_filename end link_to(content, paperclip.url, :target => '_blank') end end end end
Version data entries
8 entries across 8 versions & 1 rubygems