Sha256: 13c0a1dccac2e63bda6f7e490d2ff4e29b331172281777645db007a300cadd42
Contents?: true
Size: 643 Bytes
Versions: 38
Compression:
Stored size: 643 Bytes
Contents
module ActiveScaffold module Helpers module ListColumnHelpers def active_scaffold_column_paperclip(column, record) paperclip = record.send("#{column.name}") 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) else paperclip.original_filename end link_to(content, paperclip.url, {'data-popup' => true, :target => '_blank'}) end end end end
Version data entries
38 entries across 38 versions & 2 rubygems