-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Fix template assertion when opening a session. #16272
Fix template assertion when opening a session. #16272
Conversation
@_partials.clear | ||
@_templates.clear | ||
@_layouts.clear | ||
@_files.clear |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clearing all the Hash
instead of creating new ones since the subscribers are registered with the Hash
objects created during setup
. The previous change introduced a regression because we are actually creating new Hash
objects in the duplicated context which are not the same as those registered with the subscribers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@tgxworld can we add those ivars into an array ant iterate over that? This way both places will stay in sync. |
@@ -12,8 +12,13 @@ module TemplateAssertions | |||
teardown :teardown_subscriptions | |||
end | |||
|
|||
RENDER_TEMPLATE_INSTANCE_VARIABLES = %w{partials templates layouts files}.freeze |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@senny Instead of creating a new instance variable for the array, I decided to use a constant instead. Any thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:+1;
@senny Updated 😄 |
…pening_a_session Fix template assertion when opening a session.
Resolves #16234 (comment)
@senny @rubys