It seems like eveyone has this problem but no one has a laymans terms answer or even a proper solutions.
I have a form that uses ajax to submit the form and automati
It happened to me that "application.js" was stored twice (.../public/assets/application.js and .../app/assets/javascripts/application.js). The Rails 3.2.1 Asset pipeline compiled it and created another one. Check for that and delete the unneeded.
Keep in mind that you might already have other repeated assets, you just started noticing this one because jQuery made it evident.
This link helped me:
http://www.ruby.code-experiments.com/blog/2011/10/another-gotcha-with-the-rails-31-asset-pipeline-or-why-are-my-jquery-ujs-ajax-requests-triggered-twi.html
make sure that you have submit buttons disabled after the click on them. it helps to localize the problem.
$("form").submit(function(){
$('input[type=submit]').attr('disabled', 'disabled');
});
I had the same problem on Rails 4. I had these settings in my development.rb:
config.assets.digest = true
config.assets.enabled = true
I deleted these and ran rake assets:clean
Now its submits like it should.
On Rails 5, rails-ujs replaces jquery_ujs. Events will trigger twice if both are required
```
// app/assets/javascripts/application.js
//= require jquery_ujs <-- delete this
//= require rails-ujs
```