Skip to content

Commit

Permalink
fix: update associations_mapping reference in resource generator
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul-Bob committed Feb 24, 2025
1 parent 361e98b commit be98910
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/generators/avo/resource_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit be98910

Please sign in to comment.