From b6a6d290f231cba63662ceab2e84a171cdc6866f Mon Sep 17 00:00:00 2001 From: Bogdanov Anton Date: Thu, 25 Jul 2024 07:25:29 +0300 Subject: [PATCH] feature: use explicit handlers :props for partials rendering (#29) --- lib/props_template/extensions/partial_renderer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/props_template/extensions/partial_renderer.rb b/lib/props_template/extensions/partial_renderer.rb index 22e1c75..a8dfdfd 100644 --- a/lib/props_template/extensions/partial_renderer.rb +++ b/lib/props_template/extensions/partial_renderer.rb @@ -82,7 +82,7 @@ def block_opts_to_render_opts(builder, options) pass_opts[:locals] ||= {} pass_opts[:partial] = partial pass_opts[:formats] = [:json] - pass_opts.delete(:handlers) + pass_opts[:handlers] = [:props] if !(String === partial) raise ArgumentError.new(INVALID_PARTIAL_MESSAGE % partial.inspect)