[Nitro] Redirect change.
George Moschovitis
george.moschovitis at gmail.com
Tue Aug 23 05:36:27 EDT 2005
Hello all,
I am sightly changing the behaviour of redirect. I think the following
excerpt from the test case demonstrates the new behaviour:
def test_redirect
# relative url, the controller base_url is prepended
redirect 'hello'
assert_equal 'http://www.nitrohq.com/base/hello',
@controller.context.response_headers['location']
# absolute url, use as is.
redirect '/main'
assert_equal 'http://www.nitrohq.com/main',
@controller.context.response_headers['location']
end
This will make possible to rewrite more reusable controllers that can
be mounted on different paths. If anyone sees a problem with this let
me know. This will probably break some existing code, but it is
really easy to fix.
regards,
George.
--
http://www.gmosx.com
http://www.navel.gr
http://www.nitrohq.com
More information about the Nitro-general
mailing list