Jeremy K. wrote:
On 1/3/07, Chris firstname.lastname@example.org wrote:
template bar.rhtml". Is this a bug?
It’s hard to know without seeing a code sample. Perhaps your render call
lurking within a conditional?
I’ve checked again and the problem was with the way my testing browser
(FF 22.214.171.124 on Win32) interacted with the content-less response.
Probably because there was nothing to render, the browser simply
redisplayed the last rendered content, which happened to be the said
warning about missing template.
Rendering an empty string “fixed” this because the browser would then
display a blank page. My conusing was exacerbated by an additional
browser quirk: trying to refresh the page resulted in the browser
silently resending the last rendered request, i.e. the one which
emitted the “template missing” warning, instead of resending the request
that returned the blank 204.
Note that in 1.2 you can do “head 204” or “head :no_content” when you
nothing to render and just want to return a status and optional headers.
The symbolic status code is translated to 204 No Content (likewise for
:forbidden, head :whatever_status_code, etc.)
Thanks for all the information about 1.2. Not sure how much of an
head is over
render :nothing => true, which is nice
enough imho. However, being able to use symbolic status codes is
definitely a nifty feature!