Albert.Qing
Albert.Qing

Reputation: 4615

CarrierWave multiple images in ActiveAdmin

I have multiple images uploader for a model use carrierwave.

[![show do
    attributes_table do
      row :icon do |res|
        image_tag res.icon.url(:icon)
      end
      row :desc_images do |res|
        res.desc_images.each_with_index do |image, index|
          image_tag image.thumb.url
        end
      end
    end
  end]

enter image description here icon is work

but image_tag of desc_images not work as show in image.

How could this show like row of icon, and where can I find document about this problem?

ActiveAdmin document is too simple to read

Upvotes: 0

Views: 146

Answers (1)

xploshioOn
xploshioOn

Reputation: 4115

your code seems to be ok, can you try adding it to a list

row :desc_images do
   ul do
    res.desc_images.each do |img|
      li do 
        image_tag(image.thumb.url)
      end
    end
   end
end

Upvotes: 1

Related Questions