This repository was archived by the owner on Jul 15, 2021. It is now read-only.
File tree 3 files changed +20
-0
lines changed 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -54,4 +54,5 @@ group :development, :test do
54
54
55
55
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
56
56
gem 'spring'
57
+ gem 'faker'
57
58
end
Original file line number Diff line number Diff line change 61
61
railties (~> 4.0 )
62
62
erubis (2.7.0 )
63
63
execjs (2.6.0 )
64
+ faker (1.6.6 )
65
+ i18n (~> 0.5 )
64
66
faraday (0.9.1 )
65
67
multipart-post (>= 1.2 , < 3 )
66
68
ffi (1.9.18 )
@@ -211,6 +213,7 @@ DEPENDENCIES
211
213
byebug
212
214
coffee-rails (~> 4.1.0 )
213
215
dotenv-rails
216
+ faker
214
217
gemoji
215
218
haml-rails (~> 0.9 )
216
219
jbuilder (~> 2.0 )
Original file line number Diff line number Diff line change 5
5
#
6
6
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
7
7
# Mayor.create(name: 'Emanuel', city: cities.first)
8
+
9
+ 10 . times do
10
+ User . create (
11
+ name : Faker ::Name . name ,
12
+ email : "#{ Faker ::Internet . email . split ( "@" ) . first } @#{ ENV [ 'EMAIL_WHITELIST' ] } " ,
13
+ image : Faker ::Avatar . image
14
+ )
15
+ end
16
+
17
+ 20 . times do
18
+ Compliment . create (
19
+ complimenter : User . order ( "RANDOM()" ) . first ,
20
+ complimentee : User . order ( "RANDOM()" ) . first ,
21
+ text : Faker ::Lorem . sentence
22
+ )
23
+ end
You can’t perform that action at this time.
0 commit comments