No-brainer after all, I was sending the request via HEAD, therefore I
had to set a custom response header, such as :
// @Controller
respond_to do |format|
headers["My-head"] = "abc"
format.html { head :ok }
end
// @JS
onSuccess: function(responseText, responseXML)
{
console.log(responseText);
console.log(responseXML);
alert(this.getHeader('My-head'));
},
I changed to GET, used :
// @Controller
respond_to do |format|
format.xml { render :xml => ({"abc" => "def"}.to_xml)}
end
// @JS
onSuccess: function(responseText, responseXML)
{
console.log(responseXML);
// Getting a XML Document, all fine.
},
Half an hour though, haha - now I can send and respond to requests, woot
!? :) Thank you for the support !
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---