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

Version Path
active_scaffold-3.2.20 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.2.19 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.2.17 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.2.16 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.2.15 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.2.14 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.2.13 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.2.12 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.2.11 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.2.10 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.2.9 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.2.8 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.2.7 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.2.6 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.2.5 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.2.4 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.2.3 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.2.2 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.2.1 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-sequel-0.3.0 lib/active_scaffold/bridges/paperclip/list_ui.rb