Hi,

I am using JQuery in my rails app.  I've taken the approach outlined
in Ryan Bates's Railscast on jquery to do the following:

jQuery.ajaxSetup({
    'beforeSend' : function(xhr) {xhr.setRequestHeader("Accept",
"text/javascript")}
});

to set my ajax call request Headers to text/javascript so that my
respond to block for javascript is invoked.

This works great up until I get to wanting to call jQuery.getJSON

It appears that my ajaxSetup call causes the getJSON call to send the
text/javascript header instead of application/json.

Now there are a number of ways I can work around this (using
jQuery.ajax, not using ajaxSetup ...)

But I was wondering if there is a convention that folks have adopted
in cases like this?

Thanks!
Jay

-- 
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.

Reply via email to