I want to create default associations, however there is no methods generated for defaults for associations. If I patch FixtureBot::Default::Definition to generating methods this value is not sent to association or I can't call association inside a block in default.
I think this feature would be great, it would be a lot easier to create default associations without manually referenced it.
I asked AI, but it generated a big change so I hesitate to suggest it.
# no method account
actor.account do |fixture|
fixture.key.to_s.delete_suffix("_actor").to_sym
end
actor.roles { |fixture| [ "owner" ] }
actor.name do |fixture|
fixture.key.to_s.split("_").first.capitalize
end
actor(:bob_personal_account_actor)
I want to create default associations, however there is no methods generated for defaults for associations. If I patch FixtureBot::Default::Definition to generating methods this value is not sent to association or I can't call association inside a block in default.
I think this feature would be great, it would be a lot easier to create default associations without manually referenced it.
I asked AI, but it generated a big change so I hesitate to suggest it.