模型有2个关联。每个关联都属于相同的“组”。我们如何将相同的组传递给每个协会?
{{1}}
答案 0 :(得分:0)
factory :group_feature_config do
transient do
group
end
group_feature { association :group_feature, group_id: group.id }
group_user { association :group_user, group_id: group.id }
end