Is there a way to make url in css to work with asset pipeline Like the one below?
background: url("../assets/pattern/black_paper.png")
I'm getting file not found and I'm using S3 and Heroku on Rails 4.
You need to:
change your snippet of code to:
background: url(<%= asset_path '/pattern/black_paper.png' %>)
Try
background: asset_url("pattern/black_paper.png");
It works for me without renaming CSS files.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.