A route to serve static assets (like .jpgs, etc?)

前端 未结 5 1314
后悔当初
后悔当初 2021-02-02 16:19

I\'ve worked my way through a number of interesting routing problems - turning a request URL into a hash, etc., but just out of curiosity, is there a way to tell the routing sys

5条回答
  •  自闭症患者
    2021-02-02 16:40

    I think the simplest way solve this problem is just using image_path helper method, which provide you the path for the image you want to display in the view. For example, if you want to refer a logo.png under the /assets/images/logo.png, you can just use image_path('logo.png').

提交回复
热议问题