Chris Pearl
2007-Jan-03 11:03 UTC
`ActionController::Base#render :nothing => true` still whines about "missing template"
In FooController, I put method #bar whose only purpose is to run some logic in the background and return a status 204 [1]. So in order to return only the 204 status code, I put at the end of #bar: `render :nothing => true, :status => 204` But then when surfing to /foo/bar, I get an error about "missing template bar.rhtml". Is this a bug? (The solution eventually was `render :text => ''''`, but it really seems like a hack and that `render => :nothing` should have been the valid solution) -Chris [1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html - "204 No Content: The server has fulfilled the request but does not need to return an entity-body" --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---