Adding Interactivity with Turbo Frames

We are now going to add new functionality to our app’s schedule page. We’re going to allow a user to edit concert data inline on the schedule page. When users hit the Edit button, the display will be replaced by a form, and when they hit the Submit button on the form, the updated data is there in place. (We’re not going to worry about authentication very much here. If you are using the existing code, the sign-in links work, and you can sign in with the email areader@example.com and the password awesome.)

Oh, and we’re going to do this without writing a single line of JavaScript. Instead, we are going to use Turbo Frames.

A Turbo Frame is a custom HTML tag, <turbo-frame>, that wraps part of our page. Turbo ...

Get Modern Front-End Development for Rails now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.