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

Support :traits option on implicit association #1552

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

r7kamura
Copy link

@r7kamura r7kamura commented Oct 25, 2022

If we want to specify traits in implicit associations, we have to use :factory option. This is not only a naming problem, but also redundant in implicit style, because when using :factory option, the main factory name must always be specified, so the same name must be written twice.

  user factory: [:user, :trait1, :trait2]
# ^^^^            ^^^^

To resolve this problem, I propose to allow :traits option on implicit associations in this Pull Request.

  user traits: [:trait1, :trait2]

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

Successfully merging this pull request may close these issues.

None yet

1 participant