Skip to content

Commit d2bad68

Browse files
authored
fix: update associations_mapping reference in resource generator (#3689)
1 parent 361e98b commit d2bad68

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/generators/avo/resource_generator.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def field_from_through_association(association)
228228
# If the through_reflection is not a HasManyReflection, add it to the fields hash using the class of the through_reflection
229229
# ex (team.rb): has_one :admin, through: :admin_membership, source: :user
230230
# we use the class of the through_reflection (HasOneReflection -> has_one :admin) to generate the field
231-
associations_mapping[association.through_reflection.class]
231+
::Avo::Mappings::ASSOCIATIONS_MAPPING[association.through_reflection.class]
232232
end
233233
end
234234

0 commit comments

Comments
 (0)