I'm working in a non-privileged environment, and my Rails application's root url is http://foo.com/bar
.
What is the simplest way to tell Rails that, for example, my stylesheets are in /bar/stylesheets
, not /stylesheets
, and make model_url
point to /bar/model/baz
instead of /model/baz
?
无论您将应用程序运行到该特定路径的方式如何(无论是script/server --path=/sub-uri
还是已将乘客部署到目录 ),您都无需更改代码,因为url帮助程序将自动调整他们通往环境的道路。
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.