Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Has many association does not seem to work as expected #27

Open
alexandru-calinoiu opened this issue Jul 5, 2018 · 0 comments
Open

Comments

@alexandru-calinoiu
Copy link
Contributor

alexandru-calinoiu commented Jul 5, 2018

Here is what I am trying to build:

        Factory[:shift,
                shift_positions: [
                  Factory[:shift_position],
                  Factory[:shift_position]
                ]
        ]

My factory definitions are:

Factory.define :shift do |f|
  f.association(:shift_positions, count: 2)
end
Factory.define :shift_position do |f|
  f.association(:shift)
end

The problem is the top code will return the shift_positions code empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant