Skip to content

Install the turbo_form gem from the turbo:form generator - #214

Merged
OutlawAndy merged 1 commit into
masterfrom
turbo-form-gem
Oct 12, 2026
Merged

OutlawAndy merged 1 commit into
masterfrom
turbo-form-gem

Conversation

@OutlawAndy

Copy link
Copy Markdown
Member

Why?

rolemodel:turbo:form installed a hand-wired turbo-form Stimulus controller. The turbo_form gem supersedes that pattern: a form becomes dynamic with dynamic: true and dynamic_trigger:, with no controller, route, or action to write.

What Changed

  • turbo:form now runs bundle add turbo_form and the gem's turbo_form:install generator. The installer adds @rolemodel/turbo-form with the app's package manager and imports it into app/javascript/application.js.
  • Removed the superseded turbo-form Stimulus controller, its @rails/request.js dependency, and the expect_turbo_form_request spec helper. The gem provides expect_dynamic_form_request in system tests with nothing to include.
  • turbo_form joins the root Gemfile's test-app gems so the installer can boot in the generator specs.

Apps that already ran the old generator keep their controller. This PR doesn't migrate them.

Pre-merge checklist

  • Update relevant READMEs (turbo/form and turbo/all)

Notes

Carved out of #208, which is now stacked on this PR and keeps the agent-skill installation. The turbo generator specs pass on this branch (17 examples).

Please don't commit version changes within your PR. Versioning, releasing, and changelog entries are managed through the Release workflow.


🤖 Generated with Claude Code

Dynamic forms now go through the turbo_form gem instead of the
hand-wired turbo-form Stimulus controller. The generator adds the gem
and runs its installer, replacing the controller, its @rails/request.js
dependency, and the expect_turbo_form_request spec helper.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@OutlawAndy
OutlawAndy merged commit 135ac45 into master Oct 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants