abhim
abhim

Reputation: 1186

AJAX request being sent twice with ActiveAdmin?

I am sending a request using :remote => true, but each time I click on the request it sends it twice?

I have tried removing //require jquery from application.js, it solves this problem but then jQuery requests are not sent.

Upvotes: 0

Views: 525

Answers (3)

Leila
Leila

Reputation: 11

In my case, I had required both jquery and jquery-ujs. Deleting the latter, resolved the problem!

Upvotes: 1

rejin
rejin

Reputation: 179

Check if there any JavaScript click event with ajax binded to the element.

Upvotes: 0

ignar
ignar

Reputation: 3046

It could be that jquery-ujs included twice and there are two events that fired on click. Check all included js files for duplicates.

Upvotes: 0

Related Questions