File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -141,6 +141,8 @@ def render_in(view_context, &block)
141141 value = nil
142142
143143 @output_buffer . with_buffer do
144+ @view_context . instance_variable_set ( :@virtual_path , virtual_path )
145+
144146 rendered_template = render_template_for ( @__vc_requested_details ) . to_s
145147
146148 # Avoid allocating new string when output_preamble and output_postamble are blank
Original file line number Diff line number Diff line change @@ -98,9 +98,8 @@ def compile_to_component
9898 @component . silence_redefinition_of_method ( call_method_name )
9999
100100 # rubocop:disable Style/EvalWithLocation
101- @component . class_eval <<~RUBY , @path , @lineno - 1
101+ @component . class_eval <<~RUBY , @path , @lineno
102102 def #{ call_method_name }
103- @view_context.instance_variable_set(:@virtual_path, virtual_path)
104103 #{ compiled_source }
105104 end
106105 RUBY
You can’t perform that action at this time.
0 commit comments