mobylette
mobylette copied to clipboard
Ignore mobile on JSON requests
I have an iPhone app that is requesting JSON from my server. Rather than defaulting to the JSON respond_to, it is responding as if mobile.
Theoretically it should not do this by default. The default behaviour is to skip these kind of requests. Could you try ensuring that the correct option is set?
mobylette_config do |config|
config[:skip_xhr_requests] = true # this should be the default value anyway
end
Technically speaking is every JSON request a XHR request? I know if your call JSON using jQuery it registers as XHR, but what if I am just calling it from a iPhone application? Is it still technically a XHR request (since I am not calling it through AJAX)?