diff --git a/lib/view_model/active_record.rb b/lib/view_model/active_record.rb index 2657f827..4f9e47d0 100644 --- a/lib/view_model/active_record.rb +++ b/lib/view_model/active_record.rb @@ -392,7 +392,7 @@ def context_for_child(member_name, context:) # associations to roots start a new tree member_data = self.class._members[member_name.to_s] - if member_data.is_a?(AssociationData) && member_data.referenced? + if member_data.association? && member_data.referenced? return context.for_references end