I am building rails 4 jQuery mobile application but I find that many times, not all, forms are being submitted twice, resulting in double insertion of records. Both in development and production.
I have tried removing UJS and turbolinks but doesn't make any difference. If I disable ajax, my application won't apply the jQuery css to the returned view unless the browser is refreshed.
My javascript files are not being called twice and no assets are installed in public/assets. I have not precompiled any assets.
I wonder if this could be a problem of using a mouse instead of touch screen on a mobile? The application, while only using JQM needs to be usable from a desktop browser as well.
The issue appears to be related to using the same web actions repeatedly, for example, adding sale items to a bill or selecting a submenu item after a menu item in separate web actions.
application.js
//= require jquery
//= require jquery_ujs
//= require clubapp
//= require jquery.mobile
//= require turbolinks
gem file
gem 'rails', '4.0.0.rc2'
gem 'jquery-rails'
gem 'jquery_mobile_rails'