From bcca9c41c14e40bff5bcb6737b1b0182cbaffde8 Mon Sep 17 00:00:00 2001 From: Oskar Eichler Date: Fri, 28 Aug 2026 07:59:53 +0300 Subject: [PATCH] Collection decorator context --- lib/representable/hash/collection.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/representable/hash/collection.rb b/lib/representable/hash/collection.rb index 5df4ff40..03d0c5b5 100644 --- a/lib/representable/hash/collection.rb +++ b/lib/representable/hash/collection.rb @@ -28,7 +28,7 @@ def create_representation_with(doc, options, format) bin = representable_bindings_for(format, options).first Collect[*bin.default_render_fragment_functions]. - (represented, {doc: doc, fragment: represented, options: options, binding: bin, represented: represented}) + (represented, {doc: doc, fragment: represented, options: options, binding: bin, represented: represented, decorator: self}) end def update_properties_from(doc, options, format) @@ -38,7 +38,7 @@ def update_properties_from(doc, options, format) bin = representable_bindings_for(format, options).first value = Collect[*bin.default_parse_fragment_functions]. - (doc, fragment: doc, document: doc, options: options, binding: bin, represented: represented) + (doc, fragment: doc, document: doc, options: options, binding: bin, represented: represented, decorator: self) represented.replace(value) end