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. If that username doesnât work, the database hasnât been properly seeded, run rails db:seed to get some data.)
Oh, and weâre going to do this without writing a single line of JavaScript. Instead, ...
Get Modern Front-End Development for Rails, 2nd Edition 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.