-
Notifications
You must be signed in to change notification settings - Fork 486
Allow I18n in render lifecycle #2483
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
base: main
Are you sure you want to change the base?
Conversation
|
Maybe someone can help with the failing checks, I'm not sure what to do |
|
@23tux This looks good to me. Those checks are failing on |
Co-authored-by: Hans Lemuet <[email protected]>
|
@boardfish I added a test helper as well, could you have another look at it? Apart from the integration/system specs that require a browser (as I said, I had some problems with the setup and can't run them), all the tests pass on my machine. I added one commit to make the allocation spec more robust. And the Lint check also fails, but it doesn't seem to involve my changes. |
Co-authored-by: Hans Lemuet <[email protected]>
What are you trying to accomplish?
t(".some_key")inside a#render?method. Think ofdef render? = items.any?anditemsis a hash of translations@virtual_pathis actually set, I can now testt(..)calls in my helper method, because the teardown hasn't happened yet.What approach did you choose and why?
#render_inmethod into methods.@view_context.instance_variable_set(:@virtual_path, virtual_path)outside of the@output_buffer.with_buffer doblock. I just hope this doesn't break anything else.Anything you want to highlight for special attention from reviewers?
assert_allocations