Skip to content

Handle templates returned directly by resolvers - #2913

Open
saidM wants to merge 1 commit into
rspec:mainfrom
saidM:fix/single-template-rendering
Open

saidM wants to merge 1 commit into
rspec:mainfrom
saidM:fix/single-template-rendering

Conversation

@saidM

@saidM saidM commented Aug 21, 2026

Copy link
Copy Markdown

Rails main changed ActionView::Resolver#find to return a single template.

ResolverDecorator#nullify_templates only handled collections, so the template was returned unchanged and the real view could render when render_views was disabled.

This updates the resolver decorator to handle both single templates and collections.

Fixes #2905

Testing

  • Added a regression spec for a resolver returning a single template
  • Ran bundle exec rspec spec/rspec/rails/view_rendering_spec.rb
  • Ran RuboCop

@pirj pirj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@pirj
pirj requested a review from JonRowe August 27, 2026 19:16
@saidM

saidM commented Sep 16, 2026

Copy link
Copy Markdown
Author

hey @JonRowe, could you please have a look?

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.

render_views: false no longer nullifies templates on Rails main – ResolverDecorator#nullify_templates only handles Enumerable

2 participants