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

前端 未结 5 1269
后悔当初
后悔当初 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:41

    Things that are served out of the public directory will not go through Rails - they'll just be handled by your server (probably apache). The only reason why you would need to serve images through the rails system is if you wanted some kind of control on who could access them. Just put everything else in public and access ala: siteurl.whatever/images/*.jpg

提交回复
热议问题