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

AttributeAssigner ignores fields like :origin if another field :origin_id is present #989

Closed
AlexanderZaytsev opened this issue Feb 20, 2017 · 2 comments

Comments

@AlexanderZaytsev
Copy link

So I have this factory:

factory :product do
  origin { :amazon }
  origin_id { rand(100000).to_s }
end

If I create it like this then origin and origin_id are present:

@product = create(:product)

But if I create it like this, then origin and origin_id are nil:

@product = create(:product, origin: :amazon, origin_id: '1234')

I traced it down to AttributeAssigner#alias_names_to_ignore but I lack deep knowledge of the gem to send a pull request.

@ento
Copy link

ento commented Jun 26, 2017

I've found these previous discussions helpful:

@composerinteralia
Copy link
Collaborator

Closing in favor of #1142

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

3 participants