Simon Kiteley PRO said over 5 years ago on Creating a Gem From Existing Code :
Hi. Sorry for not being clear. My script is: ``` $("#question- .autosave input").blur(function() { // alert('----1----'); $("#question- .autosave form").submit(); // alert('----2----'); }); ``` And that seems to be working well. What is happening in the gem I have created but not the application I copied it from is that the "remote: true" on the form is being ignored and doing a 'normal' submit of the form. So: ``` ``` is behaving as if it was: ``` ``` Yes, it is quite cool in the original code I wrote as you get little save icon to show your changes have been saved etc. The code I am trying to put in a gem is a bit like SurveyMonkey on steroids. I guess is some way it is not 'attaching' the script to the remote bit. In the test/dummy I have: ```

First name:

Last name:

|
``` Which includes the questionnaire for the user. So probably something missing in the application.js: ``` //= require jquery //= require rails-ujs //= require activestorage //= require_tree . ```