I've noticed that in every page / route exchange, Rails * makes a new request Ajax to fetch this new data (HTML), and thus page exchange. I did a lot of research but the closest I got was to Embedded Ruby
( erb ).
If this is really valid, I would like to know how and with what Rails does this exchange, and what are the options and advantages of using this type of resource, for example:
- Do I have the availability of the
two-way data binding
technique as well? - What resources are available?
- Do I have other options?
Details
The question can be confusing so I decided to add some pictures that show what I really want to understand. Using a simple navigation bar with links (element a) for the exchange of routes, as shown in figure 1.
Figure1:ThenavigationmenuIusedfortesting.
Icanseethatrailsmakessomerequeststochangethesepages(suchasangularjsorvuejs),asshowninfigure2.
Figure2:Theresultsofpageexchanges/routesontheconsoletab
Wecanalsofollowthenetwork
tab,asshowninfigure3.
Figure 3: The results of page exchanges / routes on the network tab
Thank you.