In my sample project for the previous rails versions I would access the images as
<%= image_tag(product.image_url, :class => 'list_image') %>
How can I do the same in rails 3.1 sinc开发者_StackOverflow中文版e the images folder has been moved to app/assets/
?
Links like this:
<img src="/images/my-image.jpg" />
become:
<img src="/assets/my-image.jpg" />
Rails does some magic to figure out that it's actually in the images directory. So no need to specify the images directory.
精彩评论