Why? Does the code look like it might achive the goal? I had console.log statements in there, also, inspecting rails s logs
– WillFeb 21 at 16:10

Besides the error that you cannot run the this.dotheform directly in the body of the class, the codesandbox.io/s/jn5m1n1xxy shows the correct order of things happening. Since you were logging stuff, what was wrong in the order of things ?
– Gabriele PetrioliFeb 21 at 16:58

The first ajax call does not complete before the second one is called. That is the issue. Need to wait. I'm simply asking how to wait till it has finished.
– WillFeb 26 at 19:08

I only see one Ajax call. The Rails.fire just triggers a DOM event.
– Gabriele PetrioliFeb 26 at 19:37