Skip to content

Fix bug where virtual path was not reset, breaking translations outside of components #2362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 23, 2025

Conversation

joelhawksley
Copy link
Member

Closes: #2359

What approach did you choose and why?

  1. I added logic to reset virtual_path to the original value after rendering a component.
  2. I moved the logic overriding virtual path to inside render_in, making the execution path easier to follow and likely fixing an uncaught edge case where some translations wouldn't work in call methods defined by consumers.

I also fixed a small bug where running the tests locally would build the docs.

Copy link
Contributor

1 file(s) had their final line ending fixed:

  • test/sandbox/app/views/integration_examples/virtual_path_reset.html.erb

@joelhawksley joelhawksley force-pushed the 2359-virtual-path-clobber branch from 5858ce6 to 58abeb7 Compare June 20, 2025 21:43
@joelhawksley joelhawksley merged commit 756a322 into v4 Jun 23, 2025
11 of 12 checks passed
@joelhawksley joelhawksley deleted the 2359-virtual-path-clobber branch June 23, 2025 04:31
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