From be9891039799c6810bd6794cce20f24e151f102d Mon Sep 17 00:00:00 2001 From: Paul Bob Date: Mon, 24 Feb 2025 14:00:05 +0200 Subject: [PATCH] fix: update `associations_mapping` reference in resource generator --- lib/generators/avo/resource_generator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/generators/avo/resource_generator.rb b/lib/generators/avo/resource_generator.rb index ffa0a8dc9..4c6a7cf24 100644 --- a/lib/generators/avo/resource_generator.rb +++ b/lib/generators/avo/resource_generator.rb @@ -228,7 +228,7 @@ def field_from_through_association(association) # If the through_reflection is not a HasManyReflection, add it to the fields hash using the class of the through_reflection # ex (team.rb): has_one :admin, through: :admin_membership, source: :user # we use the class of the through_reflection (HasOneReflection -> has_one :admin) to generate the field - associations_mapping[association.through_reflection.class] + ::Avo::Mappings::ASSOCIATIONS_MAPPING[association.through_reflection.class] end end