Jonathan Bennett

Turbo 8 Upgrade Guide

Upgrading to Turbo 8 is straightforward for everyone looking to keep up with security updates, and will allow you to take advantage of new features incrementally.

To upgrade, you’ll need to adjust your dependencies:

  1. Update Gemfile: gem "turbo-rails", "~> 2.0"
  2. Update package.json: "@hotwired/turbo-rails": "^8.0.3

Turbo 8 doesn’t change much if you are not taking advantage of the new features so this should be a safe upgrade, but double-check with your test suite!

To start taking advantage of Turbo 8, you’ll want to enable the new morphing strategy:

	<!-- other head content -->
	<%= turbo_refreshes_with method: :morph, scroll: :preserve %>
	<%= content_for :head %>