Help me understanding assets path

16 views
Skip to first unread message

Ronald Fischer

unread,
May 31, 2014, 7:06:13 AM5/31/14
to rubyonra...@googlegroups.com
I've put my favicon into app/assets/images and include in my header

<%= favicon_link_tag 'my_favicon.jpg' %>

The favicon is correctly recognized by the browser, so it works
perfectly. When viewing the source code, I see to my surprise that the
following HTML code is generated:

<link href="/assets/my_favicon.jpg" rel="shortcut icon"
type="image/vnd.microsoft.icon" />

Aside from the MIME type (I had expected that rails would generate
image/jpeg), what really puzzles me is the path. The file is definitely
in /assets/images, not in /assets . How can the browser locate the file?

--
Posted via http://www.ruby-forum.com/.
Reply all
Reply to author
Forward
0 new messages