From a943273274b9d0e624ab7845528b0a024acf99bd Mon Sep 17 00:00:00 2001 From: Johny Ho Date: Fri, 2 Oct 2026 11:29:10 -0400 Subject: [PATCH 1/2] Version bump --- NEWS.md | 4 ++++ lib/props_template/version.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index fad5ad5..42bc76d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,9 @@ # News +## 1.0.2 + * Fix: digging was broken due to fragment_path being nil when calling `found_path!`, and + another instance where Searcher did not take Props::Options into account + ## 1.0.1 * Fix: second props partial render on the same view returns nil. The `@__json` instance variable persisted after the first partial finalized, causing diff --git a/lib/props_template/version.rb b/lib/props_template/version.rb index 162fb4d..3a3a408 100644 --- a/lib/props_template/version.rb +++ b/lib/props_template/version.rb @@ -1,3 +1,3 @@ module Props - VERSION = "1.0.1".freeze + VERSION = "1.0.2".freeze end From d2301865f56cd6ffbdb10eee86f737041920eeae Mon Sep 17 00:00:00 2001 From: Johny Ho Date: Fri, 2 Oct 2026 11:45:28 -0400 Subject: [PATCH 2/2] Use LookupContext#find! when available Rails main removed the `find_template` alias in favor of a raising `find!` and a non-raising `find`. Use `find!` when it exists so missing partials still raise, and fall back to `find_template` on older Rails. Co-Authored-By: Claude Opus 5.5 --- lib/props_template/extensions/partial_renderer.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/props_template/extensions/partial_renderer.rb b/lib/props_template/extensions/partial_renderer.rb index 36d32bc..29055ef 100644 --- a/lib/props_template/extensions/partial_renderer.rb +++ b/lib/props_template/extensions/partial_renderer.rb @@ -49,9 +49,15 @@ def find_template(partial_opts) partial = partial_opts[:partial] template_keys = retrieve_template_keys(partial_opts) details = extract_details(partial_opts) + lookup_context = @context.lookup_context - prefixes = partial.include?("/") ? [] : @context.lookup_context.prefixes - @context.lookup_context.find_template(partial, prefixes, true, template_keys, details) + prefixes = partial.include?("/") ? [] : lookup_context.prefixes + + if lookup_context.respond_to?(:find!) + lookup_context.find!(partial, prefixes, true, template_keys, details) + else + lookup_context.find_template(partial, prefixes, true, template_keys, details) + end end def retrieve_template_keys(options)