Sha256: 870681645196a40abf1a92bc086ab1950cc579bc7466171742cc703a2de0013b

Contents?: true

Size: 696 Bytes

Versions: 47

Compression:

Stored size: 696 Bytes

Contents

module ActiveScaffold
  module Helpers
    module ListColumnHelpers
      def active_scaffold_column_carrierwave(column, record)
        carrierwave = record.send("#{column.name}")
        return nil unless !carrierwave.file.blank?
        thumbnail_style = ActiveScaffold::Bridges::Carrierwave::Lib::CarrierwaveBridgeHelpers.thumbnail_style
        content = if carrierwave.versions.keys.include?(thumbnail_style)
          image_tag(carrierwave.url(thumbnail_style), :border => 0).html_safe
        else
          record.send(record.send(:_mounter, column.name).send(:serialization_column))
        end
        link_to(content, carrierwave.url, :target => '_blank')
      end
    end
  end
end

Version data entries

47 entries across 47 versions & 4 rubygems

Version Path
active_scaffold_vho-4.0.0 lib/active_scaffold/bridges/carrierwave/lib/list_ui.rb
active_scaffold_vho-3.2.14 lib/active_scaffold/bridges/carrierwave/lib/list_ui.rb
active_scaffold_vho-3.2.13 lib/active_scaffold/bridges/carrierwave/lib/list_ui.rb
active_scaffold_vho-3.2.12 lib/active_scaffold/bridges/carrierwave/lib/list_ui.rb
active_scaffold_vho-3.2.11 lib/active_scaffold/bridges/carrierwave/lib/list_ui.rb
active_scaffold_vho-3.2.10 lib/active_scaffold/bridges/carrierwave/lib/list_ui.rb
active_scaffold_vho-3.2.9 lib/active_scaffold/bridges/carrierwave/lib/list_ui.rb
active_scaffold_vho-3.2.8 lib/active_scaffold/bridges/carrierwave/lib/list_ui.rb
active_scaffold_vho-3.2.7 lib/active_scaffold/bridges/carrierwave/lib/list_ui.rb
active_scaffold_vho-3.2.6 lib/active_scaffold/bridges/carrierwave/lib/list_ui.rb
active_scaffold_vho-3.2.5 lib/active_scaffold/bridges/carrierwave/lib/list_ui.rb
active_scaffold_vho-3.2.4 lib/active_scaffold/bridges/carrierwave/lib/list_ui.rb
active_scaffold_vho-3.2.3 lib/active_scaffold/bridges/carrierwave/lib/list_ui.rb
active_scaffold_vho-3.2.2 lib/active_scaffold/bridges/carrierwave/lib/list_ui.rb
active_scaffold_vho-3.2.1 lib/active_scaffold/bridges/carrierwave/lib/list_ui.rb
active_scaffold_vho-3.2.0 lib/active_scaffold/bridges/carrierwave/lib/list_ui.rb
active_scaffold_vho-3.0.31 lib/active_scaffold/bridges/carrierwave/lib/list_ui.rb
active_scaffold_vho-3.1.8 lib/active_scaffold/bridges/carrierwave/lib/list_ui.rb
active_scaffold_vho-3.0.30 lib/active_scaffold/bridges/carrierwave/lib/list_ui.rb
active_scaffold_vho-3.0.29 lib/active_scaffold/bridges/carrierwave/lib/list_ui.rb