% if prodmultimage && prodmultimage.length >0 prodmultimage.each do |newimg| myimages = "../assets/img/course/course1.jpg" if newimg.pmi_image.to_s.present? chekpath = "#{Rails.root}/public/images/product/multi_image/#{newimg.pmi_filepath}/#{newimg.pmi_image}" if File.file?(chekpath) myimages = "#{root_url}images/product/multi_image/#{newimg.pmi_filepath}/#{newimg.pmi_image}" end end %>
<% end end %>