November 21, 2020
How to use traits in Factory Bot
FactoryBot.define do factory :example do slug 'original' trait :other do slug 'other' end end end
create(:example, :other)