Rails has had the concept of the relative_root_url /
RAILS_RELATIVE_ROOT_URL for some time. In Rails 3.x (perhaps earlier
as well, but I can't remember), the relative_root_url is only used to
generate asset paths.

I never understood why this relative_root_url isn't also used to
automatically scope all the routes? Instead I have to do it manually,

  CotaApp::Application.routes.draw do
    MyApp
      scope ActionController::Base.config.relative_url_root do
        ...
      end
  end

Sure, you can also use rewrite rules to strip the prefix before Rails
sees a url, but then how is Rails suppose to generate correct urls?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to