Slide 7
Slide 7 text
Turbo Frame in Turbo
● Independent pieces of a web page that can be appended, prepended, replaced, or
removed without a complete page refresh.
● All clicks on links and form submissions are now AJAX requests by default
● Syntax: <%= turbo_frame_tag ‘frame_name’ , target: ‘target_type’ , src: ‘url’ do %>
#code blocks
<% end %>
● Turbo Frame name are usually specified with dom_id(@instance)
● Html elements wrapped under a turbo-frame-tag references the same tag name in the
redirected url.
● Turbo Frame holds “src”a data-property which contains the url of an endpoint to fetch
content from the respective url