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

Version Path
active_scaffold-3.7.0 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.6.20 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.6.19 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.6.17 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.6.15 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.6.14 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.6.13 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.6.12 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.6.11.1 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.6.11 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.6.10 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.6.9 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.6.8 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.6.6 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.6.5 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.6.4.1 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.6.4 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.6.3 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.6.2 lib/active_scaffold/bridges/paperclip/list_ui.rb
active_scaffold-3.6.1 lib/active_scaffold/bridges/paperclip/list_ui.rb