• missing xbfish.com image

Tag Archives: ror

[Rails] Adding favicon in Ruby on Rails

Assuming you uploaded the favicon, favicon.ico to /assets/images

the next thing is to link up the favicon in the layout page.

So within the head tag, you will have the following code:

1
<%= favicon_link_tag image_path("favicon.ico") %>

The above code snippet will output:

1
<link href="/assets/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />

Hope this helps :)