Skip to content

Fix compiler crash on Rails main after template_handler_extensions removal#2662

Open
luizkowalski wants to merge 1 commit into
ViewComponent:mainfrom
luizkowalski:fix-template-handler-extensions-rails-main
Open

Fix compiler crash on Rails main after template_handler_extensions removal#2662
luizkowalski wants to merge 1 commit into
ViewComponent:mainfrom
luizkowalski:fix-template-handler-extensions-rails-main

Conversation

@luizkowalski

Copy link
Copy Markdown

Rails removed ActionView::Template.template_handler_extensions in rails/rails#57874, so the compiler crashes with NoMethodError when gathering sidecar templates on Rails main.

This reads the registered extensions through ActionView::Template::Handlers.extensions instead. That method is the supported read-path API and exists on every supported Rails version (7.1+), so no version check is needed.

Tested: full sandbox suite green on Rails 8.1; confirmed the old call raises and the new one works against the actual PR commit.

…moval

Rails removed ActionView::Template.template_handler_extensions in
rails/rails#57874. Read the registered extensions through
ActionView::Template::Handlers.extensions instead, which works on all
supported Rails versions (7.1+).
@luizkowalski luizkowalski marked this pull request as ready for review June 30, 2026 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant