Sha256: 4299479100b7bb140bb125b1ea6e8c004d59baebe68e8cfdd173fe02894994a4

Contents?: true

Size: 691 Bytes

Versions: 24

Compression:

Stored size: 691 Bytes

Contents

module ActiveScaffold
  module Helpers
    module ListColumnHelpers
      def active_scaffold_column_carrierwave(record, column)
        carrierwave = record.send("#{column.name}")
        return nil unless !carrierwave.file.blank?
        thumbnail_style = ActiveScaffold::Bridges::Carrierwave::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

24 entries across 24 versions & 1 rubygems

Version Path
active_scaffold-3.4.17 lib/active_scaffold/bridges/carrierwave/list_ui.rb
active_scaffold-3.4.16 lib/active_scaffold/bridges/carrierwave/list_ui.rb
active_scaffold-3.4.14 lib/active_scaffold/bridges/carrierwave/list_ui.rb
active_scaffold-3.4.13 lib/active_scaffold/bridges/carrierwave/list_ui.rb
active_scaffold-3.4.12 lib/active_scaffold/bridges/carrierwave/list_ui.rb
active_scaffold-3.4.11 lib/active_scaffold/bridges/carrierwave/list_ui.rb
active_scaffold-3.4.10 lib/active_scaffold/bridges/carrierwave/list_ui.rb
active_scaffold-3.4.9 lib/active_scaffold/bridges/carrierwave/list_ui.rb
active_scaffold-3.4.8 lib/active_scaffold/bridges/carrierwave/list_ui.rb
active_scaffold-3.4.7 lib/active_scaffold/bridges/carrierwave/list_ui.rb
active_scaffold-3.4.5 lib/active_scaffold/bridges/carrierwave/list_ui.rb
active_scaffold-3.4.4 lib/active_scaffold/bridges/carrierwave/list_ui.rb
active_scaffold-3.4.3 lib/active_scaffold/bridges/carrierwave/list_ui.rb
active_scaffold-3.4.2 lib/active_scaffold/bridges/carrierwave/list_ui.rb
active_scaffold-3.4.1 lib/active_scaffold/bridges/carrierwave/list_ui.rb
active_scaffold-3.4.0.1 lib/active_scaffold/bridges/carrierwave/list_ui.rb
active_scaffold-3.4.0 lib/active_scaffold/bridges/carrierwave/list_ui.rb
active_scaffold-3.3.3 lib/active_scaffold/bridges/carrierwave/list_ui.rb
active_scaffold-3.3.2 lib/active_scaffold/bridges/carrierwave/list_ui.rb
active_scaffold-3.3.1 lib/active_scaffold/bridges/carrierwave/list_ui.rb