Sha256: 6269f003742bfd00a9f7a785f00d7bb554e2e6d119fa4110ce7ef956673dff07

Contents?: true

Size: 410 Bytes

Versions: 4

Compression:

Stored size: 410 Bytes

Contents

FactoryBot.define do
  factory :role do
    code { 'user' }

    trait :contributor do
      code { 'contributor' }
    end

    trait :moderator do
      code { 'moderator' }
    end

    trait :admin do
      code { 'admin' }
    end

    # factory :contributor_role , traits: [:contributor]
    # factory :moderator_role   , traits: [:moderator]
    # factory :admin_role       , traits: [:admin]
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rails_app_generator-0.3.6 after_templates/addons/factory_bot/custom_factories/role.rb
rails_app_generator-0.3.5 after_templates/addons/factory_bot/custom_factories/role.rb
rails_app_generator-0.3.4 after_templates/addons/factory_bot/custom_factories/role.rb
rails_app_generator-0.3.3 after_templates/addons/factory_bot/custom_factories/role.rb