I generated a scaffold in ruby and I want to insert a background image to every page on the site but Im not sure what the link to the image should be.
my image is in app/assets/images/"dep.jpg"
this is what i have but it isnt working:
background-image:url('../images/dep.jpg');
}
Any help? thanks
In Rails 3.1, the path will actually be `/assets/dep.jpg':
background-image: url(/assets/dep.jpg);
If you convert your scaffold.css file to a Sass file (rename to scaffold.css.scss
) then you can use the helper:
background-image: image-url("dep.jpg");