ViewComponent

Episode #491 by Teacher's Avatar David Kimura

Summary

Continuing from the previous episode, we look at organizing the code so that it's easier to manage. To do this, we'll use ViewComponent and address some issues that arise.
rails view organization 11:12

Chapters

  • Introduction (0:00)
  • Installing ViewComponent (1:02)
  • Adding the Skeleton (2:30)
  • Adding the Skeleton View (2:59)
  • Fixing turbo_frame_tag issues (3:46)
  • Fixing TailwindCSS Issues (4:53)
  • Adding the Post View component (6:12)
  • Helper method (7:41)
  • Final Thoughts (10:33)
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