开发者

Rails 2.3.8: How can I change the asset path for my javascripts, stylesheets and images

开发者 https://www.devze.com 2023-03-28 22:12 出处:网络
I want to redirect 开发者_开发百科my Rails 2 application ask for javascripts that resides on another server eg http://asset.example.com/javascripts how can I do that?

I want to redirect 开发者_开发百科my Rails 2 application ask for javascripts that resides on another server eg http://asset.example.com/javascripts how can I do that?

Thanks,


In config/environments/production.rb:

config.action_controller.asset_host = "http://asset.example.com"


Include the following line in environment.rb or specifically production.rb

ActionController::Base.asset_host = "assets.example.com"
0

精彩评论

暂无评论...
验证码 换一张
取 消