Sha256: 687261e1f72477f7ab5ce5b20ac3688df9552190745384ae079f851a4d1d18cd
Contents?: true
Size: 653 Bytes
Versions: 26
Compression:
Stored size: 653 Bytes
Contents
FactoryBot.define do factory :profile, class: Profile do |f| f.user_group_id {UserGroup.first.id} f.required_role_id {Role.where(name: 'User').first.id} f.sequence(:user_number){|n| "user_number_#{n}"} f.library_id { 2 } f.locale { "ja" } factory :librarian_profile, class: Profile do |profile| profile.required_role_id {Role.where(name: 'Librarian').first.id} profile.association :user, factory: :librarian end factory :admin_profile, class: Profile do |profile| profile.required_role_id {Role.where(name: 'Administrator').first.id} profile.association :user, factory: :admin end end end
Version data entries
26 entries across 26 versions & 3 rubygems