-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
We are using render_anywhere to render a series of pages, and as such there is a loop.
There are some instances where instance variables are set on iterations of the loop that won't be needed on the next iteration. Leaving them assigned causes rendering issues, but there is no unset_instance_variable method (or similar).
Re-initializing the object which uses the render_anywhere gem on each iteration of the loop would evidently solve this but would be an expensive operation.
Would adding a method like the following be a viable solution?
def unset_instance_variable(var)
rendering_controller.class_eval do
undef :"#{var}"
undef :"#{var}="
end
endMetadata
Metadata
Assignees
Labels
No labels