maryanne maryanne - 1 year ago 68
CSS Question

Logo does not show up on every page

I've set a logo for my rails application and it shows up on every static page. But if I sign in, the newly created link

does not display it anymore,the same with
Here's my

<header class="navbar navbar-fixed-top navbar-inverse">
<div class="containers">
<a href='/'><img src="image1.png" alt='image'></a>
<%= link_to "Cherry Pie", root_path, id: "logo" %>

The logo is now located in
folder. I tried to move it into
folder but nothing changed. How can I make it show the same way on every page?

Answer Source

If the image in the public folder you can use image_tag for view on every page ;

<%= image_tag "/../image1.png" %>

More about image_tag here.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download