Welcome to the rebuilding turbo-rails tutorial!

Welcome to the rebuilding turbo-rails tutorial!

Source code of the tutorial


You can access the source code of the tutorial on Github. Each commit corresponds to one video of the course, so it's easy for you to follow along!


What will we learn?


In this tutorial, we will:

  • Learn to create Rails engines from scratch thanks to the rails plugin new command

  • Rebuild together all the backend turbo-rails features

  • Learn how to test our engine both manually and with automated tests thanks to the test/dummy Rails application

  • Learn how to create installation rake tasks thanks to Rails templates

  • Test our finalized engine in a real Ruby on Rails application


By the end of the tutorial, you will understand in-depth how turbo-rails works under the hood and even be able to contribute to it yourself! You will also be able to create your own extensions to the Ruby on Rails framework.

All the knowledge we will learn together applies to other Rails engines such as ActionText or ActiveStorage, for example.

It will also teach you how to read the source code of a gem to understand it when the documentation is scarce.


Ready for a great session of peer programming? Let's get started!

The rebuilding turbo-rails tutorial

Buy nowLearn more

Introduction and source code of the tutorial

  • Welcome to the rebuilding turbo-rails tutorial!

Rails plugins architecture

  • Creating our turbo-clone Rails engine
  • Railtie vs Full Engine vs Mountable Engine

Setting up our development and test environments

  • CRUD on the Article model
  • @hotwired/turbo-rails JavaScript dependency

Turbo Frames and Turbo Stream views

  • Turbo Frame tag helper
  • Turbo Frame tag helper test
  • Turbo Stream MIME type
  • Turbo Stream Tag Builder (part 1)
  • Turbo Stream Tag Builder (part 2)
  • Turbo Stream Tag Builder (part 3)
  • Integration Test
  • Turbo Stream Tag Builder tests
  • Turbo Stream Renderer

Broadcasting Turbo Stream views with Action Cable

  • Turbo Streams broadcastings principles
  • Turbo Stream from helper
  • Turbo Stream from helper test
  • Broadcasting HTML principles
  • Broadcast append to method
  • Other Broadcastable methods
  • Broadcastable tests

Asynchronous Broadcastings with Active Job

  • Asynchronous broadcastings (part 1)
  • Asynchronous broadcastings (part 2)
  • Asynchronous broadcastings tests

Security concerns

  • Showing the security issue
  • Active Support Message Verifier
  • Implementing signed stream names

Installation rake tasks and final tests

  • Installation Rake tasks
  • Testing our clone in a real Rails application

Conclusion

  • Congratulations!