Hello list,
I'm trying to find a solution to this problem. I have a Resource model with the following relationships
Resource -> Domain -> User
Resource -> Contact -> User
And this is my declaration
factory :certificate do
...
association :domain
association :contact
What I'd like to do, it to be able to specify the user for both associations to be the same. With the current declaration, when the associations are evaluated they result in two different users.
Ideally, I'd like to do something like this
factory :certificate do
...
association :domain
association :contact, user_id: domain.user_id
or
factory :certificate do
user = ...
...
association :domain, user_id:
user.id association :contact, user_id:
user.id
Any suggestion?
Thanks,
-- Simone