I've got the whole app running in under www.example.com/myapp/.
I've got the typical root setup in my app using scope as in:
scope "/myapp/" do
root :to => "home#index"
end
I'd like to use the root_path
method. However, it omits the final trailing slash and this interferes with routing in my web s开发者_运维百科erver. I could certainly fuss with the web server routing, but I'd really just like rails to give me a trailing slash.
root_path is deprecated: http://apidock.com/rails/Rails/Configuration/root_path . I'm pretty sure you want something like the examples provided here http://joneslee85.wordpress.com/2010/05/27/the-dilemma-of-rails-root-vs-rails_root-complex/, look at Rails.root.
精彩评论