Inline Editing with Turbo

Episode #381 by Teacher's Avatar David Kimura

Summary

Using Turbo, we can create an interactive inline editing feature without writing any Javascript. In this episode, we look at some of the nuances with Turbo Streams and handling form errors.
rails turbo form 10:32

Chapters

  • Introduction (0:00)
  • Development Starts (1:10)
  • Moving index view to a partial (1:23)
  • Making the edit request (3:01)
  • Updating users#edit action (4:03)
  • Demo user#edit action (5:09)
  • Updating users#update action (5:41)
  • Demo users#update action (6:37)
  • Creating Cancel link (7:35)
  • Final thoughts (10:04)
Student & Teacher
$ 9 /mo

Valid School Email Required

Same Access as Pro

Subscribe Now
Pro Monthly
$ 19 /mo

Access to Pro Episodes

Invite to Slack Channel

Priority Suggestions

Ad Free

Subscribe Now
Pro Annual
$ 190 /yr

Access to Pro Episodes

Invite to Slack Channel

Priority Suggestions

Ad Free

Subscribe Now
Teams
$ 57 /mo

3 Users Minimum

$19.00 / user / month

Same Access as Pro

Subscribe to Teams