I’ve done AJAX calls to Rails’ Controllers before yet never required to
generate a response back to the view. In this respect, I have tried to
keep it moronically simple and just add a node to see that it works, yet
the response doesn’t come through / isn’t interpreted as it should. Long
story short, code :
// Have to use Mootools to integrate a Moo-specific JS Script
respond_to do |format|
format.html { head :ok }
format.xml { render :xml => ({:foo => "bar"}.to_xml) }
end
// Have tried format.json, with all the code involved (:json, .to_json),
yet
// nothing. The to_xml Method works in irb.
The responseText is “” and responseXML is Null on the callback. This is
basic stuff, can’t see past my noobness :). So I just want to render
some xml back to the view, no models or anything yet. I have to mention
that Content-Length is set on the response header. I’m thinking it’s a
no-brainer though
 ,
    format.html { head :ok }
that Content-Length is set on the response header. I’m thinking it’s a
no-brainer though
Have you proven to yourself that it is getting to your controller
action ok? For example by breaking in with ruby-debug.
Colin
Yes, it is getting there - I’ll look into it now after some sleep :),
perhaps there’s some nasty oversight. Still getting the same issues as
before though.