Vysakh Sreenivasan
Vysakh Sreenivasan

Reputation: 1729

When using turbolinks (rails), sending multiple ajax request instead of one

Looking at the firebug, this line is the one causing this problem:

xhr.send( ( s.hasContent && s.data ) || null ) 

in jquery.js file. Without remote: true, the form or link_to works fine with turbolink and also worked before including turbolink.

Upvotes: 2

Views: 1762

Answers (2)

Vysakh Sreenivasan
Vysakh Sreenivasan

Reputation: 1729

I found the answer after raising an issue in the github page, it was apparently because of using the javascript tag outside the head tag. Now after including the javascript tag within the head tag everything works smooth and fine.

Upvotes: 4

jizak
jizak

Reputation: 382

I have from time to time the same issue. And every time the problem was in multiple includes of javascripts files (in this case I think jquery is included more than once). Check this out

Upvotes: 3

Related Questions