-
Notifications
You must be signed in to change notification settings - Fork 6
/
sample_data.rb
20 lines (19 loc) · 1.03 KB
/
sample_data.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Populate the database with a small set of realistic sample data so that as a developer/designer, you can use the
# application without having to create a bunch of stuff or pull down production data.
#
# After running db:sample_data, a developer/designer should be able to fire up the app, sign in, browse data and see
# examples of practically anything (interesting) that can happen in the system.
#
# It's a good idea to build this up along with the features; when you build a feature, make sure you can easily demo it
# after running db:sample_data.
#
# Data that is required by the application across all environments (i.e. reference data) should _not_ be included here.
# That belongs in seeds.rb instead.
require 'ffaker'
20.times do |i|
JobPosting.create(title: FFaker::Job.title,
description: FFaker::HipsterIpsum.paragraphs(num=2).join(' '),
how_to_apply: FFaker::HipsterIpsum.sentences(num=1)[0],
full_time: [true, false].sample,
company: FFaker::Company.name)
end