Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

image_tag points to assets/ in Rails 3

I'm migrating Rails app from 2 to 3.

Somehow from,

link_to image_tag("icon.png")

img's src attribute is prefixed with "/assets/icon.png" instead of "/images/icon.png" as it was in Rails 2.

What is the correct way? Thanks

like image 587
valk Avatar asked Dec 27 '11 20:12

valk


1 Answers

Rails 3.1+ was released with a new set of features referred to collectively as the "Asset Pipeline." Read all about it in the Rails Asset Pipeline documentation.

like image 76
ezkl Avatar answered Sep 25 '22 13:09

ezkl