From 9b9129bbd3090aefb9a76a02aa25e43aa62f5469 Mon Sep 17 00:00:00 2001 From: Chris Andreae Date: Thu, 4 Jul 2019 19:41:18 +0900 Subject: [PATCH] Use helper --- lib/view_model/active_record.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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