File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99# end
1010#
1111zone = 'Eastern Time (US & Canada)'
12+ sponsors = [
13+ {
14+ name : 'Switch' ,
15+ logo : 'switch.png' ,
16+ link : 'https://switchgrowth.com'
17+ } ,
18+ {
19+ name : 'Shopify' ,
20+ logo : 'shopify.png' ,
21+ link : 'https://shopify.com'
22+ } ,
23+ {
24+ name : 'Clio' ,
25+ logo : 'clio.png' ,
26+ link : 'https://clio.com'
27+ }
28+ ]
29+
30+ 15 . times do
31+ sponsor = sponsors . sample
32+ before_after = rand ( 10 ) > 5
33+ now = Time . now . utc
34+ time = before_after ? now + rand ( 7 ) . days : now - rand ( 7 ) . days
35+ Event . create (
36+ name : SecureRandom . hex ( 8 ) ,
37+ location : "Location #{ SecureRandom . hex ( 8 ) } " ,
38+ description : "Description #{ SecureRandom . hex ( 8 ) } " ,
39+ sponsor : sponsor [ :name ] ,
40+ sponsor_logo : sponsor [ :logo ] ,
41+ sponsor_link : sponsor [ :link ] ,
42+ status : :published ,
43+ start_at : time
44+ )
45+ end
46+
1247events = [
1348 {
1449 name : 'Inaugural Edition' ,
You can’t perform that action at this time.
0 commit comments