title: Rails How To List all Images in a Folder using the image_tag?
body: <p>Im trying to take all the images in the 'app/assets/images/slide' folder and put them withing  tags (in order). So, it will look like this :</p>
  
  <pre><code>&lt;img src="1.jpg" &gt;
  &lt;img src="2.jpg" &gt;
  &lt;img src="3.jpg" &gt;
  </code></pre>
  
  <p>How can I achive this? (Im using Rails 3.2.9)</p>
  
  <p>Here's the code I tried (thanks to Khaled). But it outputs a plain text list of all image paths. I need the images to show :</p>
  
  <pre><code>@images = Dir.glob("app/assets/images/slide/*.jpg")
  
  @images.each do |image|
      image_tag image.gsub("app/assets/images/", "")
  end
  </code></pre>