Ajax and Rails
Lifecycle of SJR
SJR works like this:
A User submits a form that has the Rails attribute
remote=trueon the form tag which makes the form submission happen via AJAX. See the Rails guide for more information.
The server receives the data payload and processes a response.
The Response from the server is a blob of JS not JSON that usually comes from a matching
The User's browser receives the JS blog and evals the JS to update the page.