如何重写此内容以避免重复条目?如何在嵌套迭代中避免重复条目
images.each do |img|
thumbs.each do |th|
html << link_to(image_tag("#{th.url}"), "#{img.url}")
end
end
我想包装缩略图th.url
成指向原始图像img.url
起来:
我使用fog宝石摆脱S3 images
和thumbs
。
他们的文件不同的前缀: storage.directories.get(bucket, :prefix => "thumbs").files
你应该在这里提供更多细节。什么是“图像”和什么是“大拇指”。我认为'图像'是一个Paperclip对象的数组。但我可能是错的。 – Waseem
对不起,现在更新 – NARKOZ