Sha256: a42de1863cd55d231df6c32b4c28550ffc3c0d43f476b5309e7099c142a1e152

Contents?: true

Size: 448 Bytes

Versions: 3

Compression:

Stored size: 448 Bytes

Contents

Account.delete_all
User.delete_all

accounts = []
10.times do |n|
  accounts << Account.create!(name: Faker::Name.name)
end

100.times do |n|
  user = User.create!(
    first_name: Faker::Name.first_name,
    last_name: Faker::Name.last_name,
    age: rand(18..95),
    gender: ['Male', 'Female'].sample,
    active: [true, false].sample,
    account: accounts.sample
  )
  user.created_at = Date.new(Date.today.year, rand(1..12))
  user.save!
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
reporta-modules-0.0.3 spec/dummy/db/seeds.rb
reporta-modules-0.0.2 spec/dummy/db/seeds.rb
reporta-modules-0.0.1 spec/dummy/db/seeds.rb