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