[Nitro] Nitro::Dispatcher::ROOT and running nitro in a subdirectory...
bryan.a.soto at gmail.com
Tue Apr 11 16:29:26 EDT 2006
On 4/11/06, Andrew Thompson <vagabond at cataclysm-software.net> wrote:
> This *kinda* works (you had a sub instead of a sub! in your patch). I
> had to hack redirect too because it was redirecting to the document
> root. It seems to otherwise work except that links are also incorrect. I
> guess I'd have to dive into the template code to fix that bit...
Oops, thanks on the sub!. Obviously my unit tests need some work...
Good point on the redirects. I've attached a patch for redirect_home.
Does redirect_referer work? I can't tell by eyeballing it...
With your views, I think if you use encode_url (R is an alias to it),
you'll get integration with the doc root stuff. Has the benefit too
that you don't have to update all the urls if you ever move to a new
directory or change a mount point. :)
# Encode controller, action, params into a valid url.
# Automatically respects nice urls and routing.
# Handles parameters either as a hash or as an array.
# Use the array method to pass parameters to 'nice' actions.
# Pass Controller, action, and (param_name, param_value)
# === Examples
# encode_url ForaController, :post, :title, 'Hello', :body, 'World'
# encode_url :post, :title, 'Hello', :body, 'World' # => implies
controller == self
# encode_url :kick, :oid, 4
Hope that helps,
"Never tell people how to do things. Tell them what to do and they
will surprise you with their ingenuity." —General George S. Patton
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 654 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/nitro-general/attachments/20060411/0046dabf/attachment.bin
More information about the Nitro-general