This works, unless I uncomment the Content-Type line in the
controller. Setting this header should NOT be necessary though I think.
The correct content type for rjs should automatically be set by Rails.
I’ve searched the web for an answer, but the only thing that I found was
that something else was forcing an incorrect mimetype to be set. FYI:
I’m using Webrick in development mode.
I have run into this problem when I was using render_to_string. This
was setting the response header incorrectly and required me to manually
set it back so that the RJS would work.
do you have any other templates, namely, destroy.rhtml? if so, this
is most liekly the cause as rails will attempt to render, by default,
any .rhtml or .rxml templates BEFORE .rjs templates.
Chris
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.