Search code examples
ruby-on-railsshortcutfavicon

How to set "shortcut icon" in rails?


<head>
  <title>Application</title>
  <% link { :rel => "shortcut icon", :href => "/images/favicon.ico" } %>
</head>

I can't see the image which i set, What's wrong with the above code? How can i run successfully?


Solution

  • See doc:

    <%= favicon_link_tag 'favicon.ico' %>