Sha256: ef12e58ff07c57165f2ef049e4ebb5a8bb2ca765ca129e5cf935b612823f6dfd
Contents?: true
Size: 650 Bytes
Versions: 24
Compression:
Stored size: 650 Bytes
Contents
module ActiveScaffold module Helpers module ListColumnHelpers def active_scaffold_column_paperclip(record, column) 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
24 entries across 24 versions & 1 rubygems