Rails 3.1 using images under app/assets/images/subdirectory

爱⌒轻易说出口 提交于 2019-12-08 17:38:11

问题


In my Rails 3.1 app, I have images stored under app/assets/images/jquery_ui/.

I don't know how to access these in my CSS. /assets/image_name.png and /assets/jquery_ui/image_name.png do not work.


回答1:


Seems like /assets/jquery_ui/image_name.png should work,

See the answers here.




回答2:


If you just added some images to assets and it still doesn't work... you will need to restart your server (/WEBrick).



来源:https://stackoverflow.com/questions/6701010/rails-3-1-using-images-under-app-assets-images-subdirectory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!