This tutorial will show you how to add AJAX to a Rails CRUD UI using Intercooler.
Here are the steps for converting a Rails CRUD UI into an AJAX UI
ic-get-from
and
ic-target
attributes.
ic-request
parameter.
ic-put-to
and
ic-target
attributes.
update
method to render partials correct.y
X-IC-SetLocation
header.
new
and create
UI and controller code in a similar manner.
Here is a diff between the standard Rails code and Intercooler-powered code:
https://github.com/LeadDyno/intercooler-tutorial-app/commit/b425ad671746c34039bd84fc76bb7c11d6537b24