gma/nesta — Issue #93: Make Nesta work when served from a non-root URL
Author: MicahChalmer
Created: 2012-02-19 22:24:31+00:00
State: open

As of now, Nesta does not work unless it is served from the root of a domain. Functions like `url_for` return absolute URLs, and the code seems to be written assuming that everything Nesta knows about is relative to the root.

If that assumption were no longer needed, then Nesta could control part of a site (i.e. anything under a given path) without needing to take over everything. This would also address #24 (being able to embed Nesta in Rails) "for free" without having to bake in any knowledge of Rails in particular. To embed Nesta in Rails, one could just route to it like any Rack application, as described at http://www.railsdispatch.com/posts/rails-routing.

It isn't obvious to me at this point whether a non-root installation could be detected automatically so that everything "just works" without having to know about it inside the Nesta config. If not, there could need to be some sort of "Nesta URL root" option in the main configuration.