Closed stephannv closed 3 years ago
Maybe this issue should be moved to factory_bot
repo 🤔.
I realized this is not a bug. It is working as planned here: https://github.com/thoughtbot/factory_bot/blob/92114db048b70096183af622173506535b150e65/spec/factory_bot/aliases_spec.rb#L2
Is it possible to disable this behavior for specific attributes?
See https://github.com/thoughtbot/factory_bot/issues/1142 for past discussion
Thanks @composerinteralia. I'm closing this issue to avoid duplicated.
Description
I have a field to represent payment gateway and payment gateway id (like an external id), but when I use a factory to create or build an object assigning some values to these attributes, FactoryBot cannot build it correctly.
Reproduction Steps
Expected behavior
payment_b
should havegateway
andgateway_id
filled with given attributes.Actual behavior
FactoryBot cannot fill
gateway
andgateway_id
attributes values.System configuration
factory_bot_rails 6.2.0:
factory_bot 6.2.0:
rails 6.1.4:
ruby 3.0.1: