Ruby on Rails favicon not loading -
this <% favicon_link_tag '/favicon.ico' %> in head section of application.html.erb file within layouts folder.
my favicon stored in assets, , not rendering in browser tab.
any thought why happening? doing wrong here?
thanks.
you should @ output rails sending browser. you'll find no mention of favicon, you're not outputting anything.
favicon_link_tag plain old ruby function. returns value, string, containing html markup link tag favicon. you're taking value, , throwing away.
you need output value, , in erb, <%=, not <%.
replace <% favicon_link_tag ... %> <%= favicon_link_tag ... %> , you'll find have <link rel="shortcut icon" ... /> appearing in html beingness output rails app.
ruby-on-rails ruby erb favicon
No comments:
Post a Comment