0

I added an icon folder within my assets/images folder for my project in rails.

/assets
  /images
    /icons
      icon1

I am a beginner in RoR. From my understanding image_tag will look for images in assets/images. What should I do if I added an icons folder? I want ot keep my images sorted

This is what I currently have

    <%= link_to image_tag("facebook.png", alt: "facebook"), 'FB LINK' %>
    <%= link_to image_tag("youtube.png", alt: "Subscribe"), 'YOUTUBE LINK' %>
    <%= link_to image_tag("twitter.png", alt: "follow"), 'TWITTER LINK' %>

Also, how would I shrink these images to a smaller size?

Liondancer
  • 15,721
  • 51
  • 149
  • 255
  • 1
    can you not just include the folder in the path? "icons/facebook.png"? – ABMagil Jul 10 '14 at 00:32
  • http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html#method-i-image_tag Have you looked at this answer? http://stackoverflow.com/questions/7414842/rails-3-link-to-with-image-tag-text and http://stackoverflow.com/questions/5387122/link-to-image-tag-with-text-in-rails – 6ft Dan Jul 10 '14 at 02:43

0 Answers0