|
1 | | -require "faker" |
| 1 | +# Commenting out the code below to prevent accidental seeding of the database and to avoid destroying existing data. |
| 2 | +# To seed the database, uncomment the code below and run `rails db:seed` in the terminal. |
2 | 3 |
|
3 | | -JobApplication.destroy_all |
4 | | -20.times do |
5 | | - method_of_contact = %w[email internet_job_application recruiter].sample |
6 | | - email_address = (method_of_contact == "email") ? Faker::Internet.email : nil |
7 | | - website_link = (method_of_contact == "internet_job_application") ? "https://example.com/" : nil |
| 4 | +# require "faker" |
8 | 5 |
|
9 | | - JobApplication.create!( |
10 | | - date_applied: Faker::Date.backward(days: 30), |
11 | | - company_name: Faker::Company.name, |
12 | | - method_of_contact: method_of_contact, |
13 | | - email_address: email_address, |
14 | | - point_of_contact: Faker::Name.name, |
15 | | - position_type: %w[full_time part_time internship].sample, |
16 | | - position_title: Faker::Job.title, |
17 | | - website_link: website_link, |
18 | | - claimed_for_unemployment: [true, false].sample, |
19 | | - status: %w[interviewing no_response not_hired job_offer].sample, |
20 | | - location: %w[remote in_office hybrid].sample |
21 | | - ) |
22 | | -end |
| 6 | +# JobApplication.destroy_all |
| 7 | +# 20.times do |
| 8 | +# method_of_contact = %w[email internet_job_application recruiter].sample |
| 9 | +# email_address = (method_of_contact == "email") ? Faker::Internet.email : nil |
| 10 | +# website_link = (method_of_contact == "internet_job_application") ? "https://example.com/" : nil |
| 11 | + |
| 12 | +# JobApplication.create!( |
| 13 | +# date_applied: Faker::Date.backward(days: 30), |
| 14 | +# company_name: Faker::Company.name, |
| 15 | +# method_of_contact: method_of_contact, |
| 16 | +# email_address: email_address, |
| 17 | +# point_of_contact: Faker::Name.name, |
| 18 | +# position_type: %w[full_time part_time internship].sample, |
| 19 | +# position_title: Faker::Job.title, |
| 20 | +# website_link: website_link, |
| 21 | +# claimed_for_unemployment: [true, false].sample, |
| 22 | +# status: %w[interviewing no_response not_hired job_offer].sample, |
| 23 | +# location: %w[remote in_office hybrid].sample |
| 24 | +# ) |
| 25 | +# end |
0 commit comments