I have a rails app in a subdirectory of my server, something like www.domain.com/sub I need to send an url by e-mail, so I tried to use "resource_url" but it generates a开发者_开发技巧 link like www.domain.com/resource_path, where should be wwww.domain.com/sub/resource_path.
How can I solve this ?
Thanks!
In Rails 2.3.8 you can add a line like this to your config/environments/production.rb
ActionController::Base.relative_url_root = "/sub"
I am not sure what the equivalent is for Rails 3, but see this question if that is what you are using: What is the replacement for ActionController::Base.relative_url_root?
精彩评论