.search_button { background:url(image_path("search.png")); } more information : https://guides.rubyonrails.org/asset_pipeline.html
On Sunday, 22 December 2019 17:15:59 UTC+2, fugee ohu wrote: > > How do I refer to images in stylesheets with rails 6/webpacker I always > get can't resolve image.png from code like this: > .search_button > > .search_button > { > background:url(search.png); > } > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f728a86c-6e2f-44f7-8106-6583f8db5ede%40googlegroups.com.