-
Notifications
You must be signed in to change notification settings - Fork 1
/
irb.log
1007 lines (1006 loc) · 24.9 KB
/
irb.log
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
q8.save
q8 = Question.new(title: "fasasdbfasdlfjke", description: "I am greaaaat")
q8.save
q11 = Question.new(title: "fasasdbfasdlfjke", description: "fasscaaa great")
q11.save
q11 = Question.new(title: "sdbfasdlfjke", description: "fasscaaa great")
q11.save
Question.where(["title like ?", "%fas%"])
q12 = Question.new(title: "sdbfasdlfjke", description: "fasscaaa great")
q12.save
q12 = Question.new(title: "dbfasdlfjke", description: "fascaaa great")
q12.save
Question.where(["title like ?", "%fas%"])
Question.where(["title like ? OR description like ?", "%fas%"]).where([created_at > ?", 10.days.ago])
Question.where(["title like ? OR description like ?", "%fas%", "%fas%"]).where(["created_at > ?", 10.days.ago])
exit
Question.recent(10)
exit
exit
q15 = Question.new(title: "hello", description: "world")
q15 = Question.new(title: "hello", description: "world")
q15 = Question.new(title: "hello", description: "world")
reload!
q15 = Question.new(title: "hello", description: "world")
q15 = Question.new(title: "hello", description: "world")
exit
q15 = Question.new(title: "helloooo", description: "worldd")
exit
q15 = Question.new(title: "helloooo", description: "worldd")
q15 = Question.new(title: "helloooo", description: "worldd")
reload!
q15 = Question.new(title: "helloooo", description: "worldd")
exit
q15 = Question.new(title: "helloooo", description: "worldd")
q15.save
q15.update_attributes(title: "some new title", description: "some new description")
q = Question.find 100
Question.all
reload!
Question.all
q21 = Question.new(title: "master chief", description: "alien slayer")
q21.save
reload!
Question.all
Question.all
Question.all
reload!
Question.all
reload!
Question.all
exit
Question.all
exit
Question.all
reload!
Question.all
exit
Question.all
reload!
Question.all
exit
Question.all
q22 = Question.new(title: "halo troll", description: "halo sucks")
q22.save
Question.all
Question.recent_ten
Question.recent(3)
Question.scope
Question.default_order
Question.order
Question.all
doskey /history | clip
doskey /history | clip
exit
hiringtest.rb
hiringtest.rb
hiringtest.rb
exit
exit
q = Question.save
q = Question.save(" ")
exit
q3 = Question.save
q3 = Question.new
q.errors
exit
Post.new("hello","hii!")
steve = Post.new("hello","hii!")
@post = Post.new("hello","hii!")
exit
answer
Answer
exit
question.answers
answer = question.answers.new
question.answers << answer1
exit
exit
question = Question.last
question.answers
answer1 = Answer.new
answer1.body
answer1.body = "hello"
question.answers << answer1
question.answers.where(body: "hello")
q26 = Answer.new
q24.body("hello")
q24.body = "hello"
answer2 = Answer.new
answer2.body = "this is the text body"
question.answers >> answer2
answer2.body
answer2.body = "this is the text body"
question.answers << answer2
q55 = Answer.new
q55.body = "body test is here"
question.answers << q55
exit
Question.first
exit
@question = Question.last
@question.answers.ordered_by_creation
exit
Question.update_all(user_id: 1)
Question.update_all(user_id: 1)
Quest
Question.all
rails g migration add_user_references_to_questions user:references
rails g migration add_user_references_to_question user:references
exit
["Art", "Science", "Technology", "Sports", "Travel", "Humor"].each { |x| Category.create(title: x)}
["Art", "Science", "Technology", "Sports", "Travel", "Humor"].each { |x| Category.create(name: x)}
Category.create(name: "Politics")
c1 = Category.first
c2 = Category.find 4
q = Question.first
q.categories << c1
q.categories << c1
q.categories << c1
q = Question.all.sample
c1 = Category.find 1
c2 = Category find 2
c2 = Category.find 2
q.categories << c2
q.categories
Categorization.all
category = Category.find 1
category.questions
question.categories
Question.update_all(user_id: 1)
exit
Question.all
Question.all.destroy
Question.destroy.all
User.all
Question.update_all(user_id: 3)
Category.all.map(&title)
Category.all.map(&:title)
Category.all
Category.all.map(&:name)
q = Question.first
c1 = Category.first
c1 = Category.find 2
q.categories << c1
q.categories
Categorization.all
exit
exit
q = Question.first
c1 = Category.first
q.categories << c1
q2 = Question.find 2
c1 = Category.first
c1 = Category.find 2
q.categories << c1
q.categories << c2
q.categories
Categorization.all
exit
p = Project.new(title: "Student Orientation", description: "A portal for helping douglas students", due_date: "2014-04-15")
Project.all
Project.all
Project.due_date
c =Project.find(1)
c.due_date
c.due_date("2014-04-11")
exit
Task.new(title: "hello")
rails g resources tasks projects:references
rails g tasks projects:references
rails g resource tasks project:references
exit
project.create_task(title: "hello world")
project.tasks(title: "hello world")
Task.new(title: "hello world")
project.Task.new(title: "hello world")
project.task.new(title: "hello world")
Task.new(title: "hello world")
exit
Idea.all
i = Idea.new(title: "Open a new gym!", description: "I love exercise!")
Idea.all
exit
q = Idea.new(title: "hello world!", description: "This is kelsey!")
q.save
Idea.all
exit
c = idea.comments.new(body: "hello!")
c = Comment.new(body: "comment!")
c.save
User.all
user.find 1
User.find 1
User.all(name)
User.all("name")
User.all[name]
User.all[1]
c = @idea.comments.new(body: "hello!")
c = idea.comments.new(body: "hello!")
exit
exit
User.all
c = User.find 1
c
c.name
c.Name
c.email
c.name
c.name("kelsey")
c.name << kelsey
c.name >> kelsey
exit
Rails.root
exit
["Ruby on Rails", "Javascript", "HTML/CSS", "Node.js", "Scala", "Java"].each {|x| Skill.create(title: x)}
["Ruby on Rails", "Javascript", "HTML/CSS", "Node.js", "Scala", "Java"].each {|x| Skill.create(title: x)}
Skill.all
bundle exec rake db:migrate
exit
["HTML/CSS", "Node.js", "Scala", "Javascript", "Java"].each {|x| Skill.create(title: x)}
exit
Skill.new(title: "rails")
q = Skill.new(title: "rails")
q.save
Skills.all
Skill.all
q2 = Skill.new(title: "javascript")
q2.save
Skill.all
j = Job_skill.new(skill_id: 1, job_id: 1)
j = Job_skill.new(skill_id: "1", job_id: "1")
j = Job_skill.new
j = JobSkill.new
j = JobSkill.new(skill_id: "1", job_id: "1")
j.save
j2 = JobSkill.new(skill_id: "2", job_id: "2")
j2.save
JobSkill.all
j.add(skill_id: "3")
j.skill_id("3")
j4 = JobSkill.new(skill_id: ["1", "2"], job_id: "3")
j4 = JobSkill.new(skill_id: "1", job_id: "3")
j4.save
j5 = JobSkill.new(skill_id: "2", job_id: "3")
j5.save
JobSkill.all
j6 = JobSkill.new(skill_id: "1", job_id: "2")
j6.save
j7 = JobSkill.new(skill_id: "2", job_id: "4")
j7.save
JobSkill.all
t1 = TalentSkill.new(skill_id: "1", talent_id: "1")
t1.save
t2 = TalentSkill.new(skill_id: "2", talent_id: "1")
t2.save
t3 = TalentSkill.new(skill_id: "2", talent_id: "2")
t3.save
t3 = TalentSkill.new(skill_id: "2", talent_id: "3")
t3.save
TalentSkill.all
t5 = TalentSkill.new(skill_id: "1", talent_id: "4")
t5.save
TalentSkill.all
JobSkill.all
Skill.all
t6 = TalentSkill.new(skill_id: 1, talent_id: 5)
t6.save
t7 = TalentSkill.new(skill_id: 2, talent_id: 6)
t7.save
TalentSkill.all
Skill.all
TalentSkill(skill_id: "1")
TalentSkill.fetch("1")
TalentSkill.fetch(1)
TalentSkill.fetch[1]
TalentSkill.all
TalentSkill.all
JobSkill.all
JobSkill.find(1)
JobSkill.fetch(1)
JobSkill.fetch(1)
Skill.fetch(1)
exit
Skill.all
JobSkill.all
JobListing.new(title: "HooteSuite Developer", description: "get a job at hootesuite!", visible: true)
JobListing.save
jl = JobListing.new(title: "HooteSuite Developer", description: "get a job at hootesuite!", visible: true)
jl.save
jl2 = JobListing.new(title: "Mobio Developer", description: "get a job at mobio!", visible: true)
jl2.save
JobListing.all
JobSkill.all
jl3 = JobListing.new(title: "Vancouver Developer", description: "get a job in Vancouver!", visible: true)
jl3.save
JobListing.all
Talent.all
TalentSkill.all
Company
Talent.all
t2 = Talent find 2
t2 = Talent.find 2
Skill.all
t2.skills
jl
jl.skills
tl.skills
t2.skills
JobListing.each do |x| puts x end
JobListing.each do |x| puts x end
jl
TalentSkill.each do |x| x end
@talent_skills = TalentSkill.all
@talent_skills.each do |x| x end
@talent_skills.each do |x| x.skill_id end
@talent_skills.each do |x| puts x.skill_id end
@talent_skills.each do |x| puts x.skill_id end
@talent_skills.each do |x| x.skill_id end
@talent_skills.each do |x| x.skill_id end
@talent_skills.each do |x| puts x.skill_id end
@job_skills = JobSkill.all
@talent_skills.each do |x| @job_skills.each {|js| puts js.skill_id } x.skill_id end
@talent_skills.each do |x| @job_skills.each {|js| puts js.skill_id }end x.skill_id end
@talent_skills.each do |x| @job_skills.each do |js| puts js.skill_id x.skill_id end
@talent_skills.each do |x| @job_skills.each do |js| puts js.skill_id end puts x.skill_id end
@talent_skills.each do |x| @job_skills.each do |js| put@talent_skills.each {|ts| puts ts.skill_id }s js.skill_id end puts x.skill_id end
@talent_skills.each {|ts| puts ts.skill_id }
@talent_skills.each {|ts| put ts.skill_id }
@talent_skills = TalentSkill.all
@job_skills = JobSkill.all
@talent_skills.each {|ts| puts ts.skill_id }
@talent_skills.each do |x| x end
@talent_skills.each do |x| @job_skills.each do |js| put@talent_skills.each {|ts| puts ts.skill_id }s js.skill_id end puts x.skill_id end
@talent_skills.each do |x| puts x.skill_id end
@talent_skills.each do |x| x end
@talent_skills.each do |x| puts x.skill_id end
exit
/exit
@talent_skills.each do |x| puts x.skill_id end
exit
ASDF
sd
fas
df end
debugger
--end
exit
@talent_skills = TalentSkill.all
@job_skills = JobSkill.all
@talent_skills.each{|ts| puts ts.skill_id }
@job_skills.each{|js| puts js.skill_id}@job_skills.each{|js| puts js.skill_id}
@job_skills.each{|js| puts js.skill_id}
@talent_skills.each{|ts| puts ts.skill_id}
@job_skills.each{|js|
if js.skill_id == @talent_skills.skill_id
puts "It's a match!"
else
puts "not a match!"
end
}
@job_skills.each{|js|
if js.skill_id == @talent_skills.skill_id
puts "It's a match!"
else
puts "not a match!"
end}
@job_skills.each{|js|
if js.skill_id == TalentSkill.all.skill_id
puts "It's a match!"
else
puts "not a match!"
end}
@job_skills.job_listing_id.each{|js|
puts js
end}
@job_skills.job_listing_id.each{|js|
puts js}
@job_skills_job_id = JobSkill.job_id
@talent_skills = TalentSkill.all
@job_skills = JobSkill.all
@job_skills_job_id = JobSkill.job_id
@talent_skills.each{|ts| puts ts.skill_id }
@job_skills.each{|js| puts js.skill_id}
@job_skills_job_id.each{|js|
puts js}
@talent_skills = TalentSkill.all
@job_skills = JobSkill.all
@job_skills_job_id = @job_skills.job_id
@talent_skills.each{|ts| puts ts.skill_id }
@job_skills.each{|js| puts js.skill_id}
@job_skills_job_id.each{|js| puts js}
@talent_skills = TalentSkill.all
@job_skills = JobSkill.all
@job_skills_job_id = JobSkill.job_listing_id
@talent_skills.each{|ts| puts ts.skill_id }
@job_skills.each{|js| puts js.skill_id}
@job_skills_job_id.each{|js| puts js}
@talent_skills = TalentSkill.all
@job_skills = JobSkill.all
@job_skills_job_id = JobSkill.all.job_listing_id
@talent_skills.each{|ts| puts ts.skill_id }
@job_skills.each{|js| puts js.skill_id}
@job_skills_job_id.each{|js| puts js}
@job_skills_job_id = JobSkill.all(job_listing_id)
@job_skills_job_id.each{|js| puts js}@talent_skills = TalentSkill.all
@job_skills = JobSkill.all
@talent_skills.each{|ts| puts ts.skill_id }
@job_skills.each{|js| puts js.skill_id}
JobSkill.each{|js| puts js.skill_id }
@job_skills.each{|js| puts js.skill_id}
JobSkill.all.each{|js| puts js.skill_id }
@job_skills.talent_id.each{|js| puts js.skill_id}
@job_skills.talents.each{|js| puts js.skill_id}
@job_skills.talent.each{|js| puts js.skill_id}
@job_skills.talent.each
@job_skills.talents.each
JobListing.first
jl.job_skills.all
JobListing.find 3
jl = Jo
jl.job_skills.all
@job_listing = JobListing.first
x = JobListing.find(@job_listing)
x.job_skills.all
@job_listing = JobListing.find(3)
x = JobListing.find(@job_listing)
x.job_skills.all
@job_listing = JobListing.find(3)
job_skill_list = JobListing.find(@job_listing)
job_skill_list.job_skills.all
@job_listing = JobListing.find(3)
job_id = JobListing.find(@job_listing)
job_id.job_skills
@job_listing = JobListing.find(3)
job_id = JobListing.find(@job_listing)
job_id.each {|ji| puts ji.skill_id}
@job_listing = JobListing.find(3)
job_id = JobListing.find(@job_listing)
job_id.each{|ji| puts ji.skill_id}
@job_listing = JobListing.find(3)
job_id = JobListing.find(@job_listing)
job_id.job_skills
\@job_listing = JobListing.find(3)
job_id = JobListing.find(@job_listing)
job_id.job_skills = @j_skills
@j_skills.each{|js| puts js.skill_id }
@job_listing = JobListing.find(3)
job_id = JobListing.find(@job_listing)
job_id.job_skills
@job_listing = JobListing.find(3)
job_id = JobListing.find(@job_listing)
job_id.job_skills
@talent_listing = TalentListing.find(1)
talent_id = TalentListing.find(@talent_listing)
talent_id.talent_skills @talent_skills.each{|ts| puts ts.skill_id }
@talent_listing = TalentListing.find(1)
talent_id = TalentListing.find(@talent_listing)
@job_listing = JobListing.find(3)
job_id = JobListing.find(@job_listing)
job_id.job_skills@talent_skill = Talent.find(1)
talent_id = Talent.find(@talent_skill)
talent_id.talent_skills
@job_listing = JobListing.find(3)
@job_id = JobListing.find(@job_listing)
@job_id.job_skills@talent_skills = TalentSkill.all
JobListing.first
@job_skills = JobSkill.all
@talent_skills.each{|ts| puts ts.skill_id }
@job_skills.talents.each
@talent_skill = Talent.find(1)
talent_id = Talent.find(@talent_skill)
talent_id.talent_skills.each{|ts| puts ts.skill_id}
@talent_skill = Talent.find(1)
talent_id = Talent.find(@talent_skill)
talent_id.talent_skills.each{|ts| puts ts.skills}
@talent_skill = Talent.find(1)
talent_id = Talent.find(@talent_skill)
talent_id.talent_skills.each{|ts| puts ts.skills}
@talent_skill = Talent.find(1)
talent_id = Talent.find(@talent_skill)
talent_id.talent_skills{|ts| puts ts.skills}
@talent_skill = Talent.find(1)
talent_id = Talent.find(@talent_skill)
talent_id.talent_skills{|ts| puts ts.skill_id}
@talent_skill = Talent.find(1)
talent_id = Talent.find(@talent_skill)
talent_id.talent_skills.count
@talent_skill = Talent.find(1)
talent_id = Talent.find(@talent_skill)
talent_id.talent_skills.length
@job_listing = JobListing.find(3)
@job_id = JobListing.find(@job_listing)
@job_id.job_skills
@talent_skills.each{|ts| puts ts.skill_id }
@talent_skills.Talent.find(1).each{|ts| puts ts.skill_id }
@talent_skills = TalentSkill.find(1)
@talent_skills.each{|ts| puts ts.skill_id }
@talent_skills = TalentSkill.find(1)
@talent_skills = TalentSkill.find(1)
@talent_skills.each{|ts| puts ts.skill_id }
JobListing.first
@job_skills = JobSkill.all
@job_skills.each{|js| puts js}
@talent_skills = TalentSkill.find(1)
@talent_skills.skill_id
TalentSkill.find(1)
@job_listing = JobListing.find(3)
puts @job_listing.skill_ids
@talent_listing = Talent.find(1)
puts @talent_listing.skill_ids
JobListing.all
JobListing.find(3)
@job_listing = JobListing.find(3)
puts @job_listing.skill_ids
@job_listing = JobListing.find(3)
puts @job_listing.skill_ids
@talent_listing = Talent.find(1)
puts @talent_listing.skill_ids
if @job_listing.skill_ids == @talent_listing.skill_ids
puts "match!"
else
puts "not a match!"
end
@all_talent = Talent.all
@all_talent.each{|t| puts t.skill_ids }
TalentSkills
TalentSkills.all
TalentSkils.all
TalentSkill.all
@job_listing.skill_ids
Skill.all
Skill.title
@job_listing.skill_title
@job_listing.skill_titles
@job_listing.skill_id
@job_listing.skill_ids
s = Skill.find(2)
s.title
s2 = Skill.find(@job_listing.skill_ids)
s2.title
s2.titles
s2.each do |x| puts x.title end
s2.each do |x| puts x.title end
s2 = Skill.find(@job_listing.skill_ids)
@skills.each.map {|s| s.title}
@skills.each.map {|s| s}
Skill.index[1]
Skill.all
Skill.id(1)
Skill.id[1]
Skill.id("1")
Skill.find("1")
Skill.find("1").skills_id
Skill.find("1").index
Skill.find("1")
Skill.find("1").title
Skill.find("1").title
talent.name
@talents = Talent.all
@talents.each do talent.skill_ids.count end
@talents.each do talent.skill_ids end
@talents.each do talent.first_name end
exit
Talent.all
q = Talent.find(3)
q.skill_id
q.email
User.all
Talent.all
User.full_name
User.all
User.find(1).full_name
User.find(6).full_name
exit
Talent.all
@talent = Talent.find(3)
@talent.full_name
Talent.find(nil)
Talent.all(nil)
Talent.all.nil
Talent.all.user_id
Talent.user_id
exit
exit
Talent.all
User.all
JobSkills.all
JobSkill.all
TalentSkill.all
q = User.find(4)
q.add(skill_id: 1)
b = User.find(4)
b.talent.talentskills
b.talent.talent
b.talent.talent_skill
b.talent.talent_skills
b.talent.talent_skills
b
b.talent.talent_skills.skills
b.talent.talent_skills.skills_ids
b.talent.talent_skills.skill_ids
b.talent.talent_skills
b.talent.talent_skills.find 1
b.talent.talent_skills(skill_id >> 1)
b.talent.talent_skills(skill_id: 1)
b.talent.talent_skills.find 1
b.talent.talent_skills
TalentSkill.all
Skill.all
skill = Skills.first
skill = Skill.first
b.talent.talent_skills << skill
b.talent.talent_skills << skill
clear
b.talent.talent_skills = skill
b = User.find (4)
b.email
b.email = "[email protected]"
b.talent.talent_skills
b.talent.talent_skills.skill_ids
b.talent.talent_skills.skill_id
b.talent..skill_id
b.talent.skill_id
b.talent.talent_skills.skill_id
b.talent.talent_skills.skills
b.talent.talent_skills.title
b.talent.talent_skills.new
b.talent.talent_skills
b.talent.talent_skills
b.talent.talent_skills.skill_id
b.talent.talent_skills.skill_ids
skill
b.talent.talent_skills.new(skill_id: 1)
b.talent.talent_skills.new(skill_id: 2)
b.talent.talent_skills.create(skill_id: 2)
b.talent.talent_skills.create(skill_id: 1)
b.talent.talent_skills.create(skill_id: 3)
b.talent.talent_skills.create(skill_id: 1)
b.talent.talent_skills
b.talent.talent_skills
b.talent.talent_skills.find_by_skill_id
b.talent.talent_skills.find_by_skill_id(1).destroy\
b.talent.talent_skills
b.talent.talent_skills.find_by_skill_id(1).destroy
b.talent.talent_skills
b.talent.talent_skills.find_by_id(1).destroy
b.talent.talent_skills
b.talent.talent_skills.destroy
b.talent.talent_skills
TalentSkill.all
b.talent.talent_skills
TalentSkill.all
b.skill_id
q = Talent.find(1)
q.skill_ids
c = [1, 2, 3, 4, 5, 6]
m = [2, 3, 5, 6, 7]
c - m
c
n = [2, 3, 5, 6, 7, 8, 9, 10]
c - n
n = [2, "3", "five", 6, 7, 8, 9,]
c - n
a = ["cat","dog","sheep"]
b = ["cat", "human"]
a - b
b = ["sheep", "cat"]
a - b
exit
Talent.all
Talent.find(1)
Talent.find(6)
User.all
Admin.all
TalentSkill.all
JobListing.all
Talent.all
Skill.all
TalentSkill.all
Talent.all
exit
Talent.all
exit
exit
18.times { FactoryGirl.create(:comment)
18.times { FactoryGirl.create(:comment)}
18.times { FactoryGirl.create(:comment)}
18.times { FactoryGirl.create(:comment)}
exit
nd
18.times { FactoryGirl.create(:comment)}
exit
exit
rspec spec/controllers/questions_controller_spec.rb
rspec spec/controllers/questions_controller_spec.rb
exit
exit
Delayed::Job.all
exit
User.all
k = User.first
k(is_admin: true)
k.add(is_admin: true)
User.first(is_admin: true)
User.first[is_admin: true]
k
k(is_admin: true)
k.is_admin?
k.is_admin = true
k.is_admin?
exit
100.times { Campaign.create(title: Faker::Company.bs, details: Faker::Lorem.paragraph, target: rand(1000000, end_date: ()))}
100.times { Campaign.create(title: Faker::Company.bs, details: Faker::Lorem.paragraph, target: rand(1000000, end_date: ()))}
100.times{ Campaign.create(title: Faker::Company.bs, details: Faker::Lorem.paragraph, target: rand(1000000, end_date: ()))}
end
100.times{ Campaign.create(title: Faker::Company.bs, details: Faker::Lorem.paragraph, target: rand(1000000, end_date: ()))}
end
100.times{ Campaign.create(title: Faker::Company.bs, details: Faker::Lorem.paragraph, target: rand(1000000), end_date:(Time.now+10.day) )}
exit
Orientation.all
User.all
User.all
@orientation = Orientation.find(1)
@orientation = Orientation.find(params[1])
User.all
User.first(school_id: 1)
end
User.all
k
Orientation.all
School.all
User.all
k
k = User.find[1]
k = User.find(1)
k
k.school_id = 1
School.all
k
School.all
Orientation.all
Mission.all
Mission.orientation_id
Missions.new(name: "Mission 1", description: "This is the first mission to tackle!"
end
Missions.new(name: "Mission 1", description: "This ifirst mission to tackle!"
Missions.new(name: "Mission 1", description: "This ifirst mission to tackle!", orientatiid
end
end
Missions.new(name: "Mission 1", description: "This ifirst mission to tackle!", orientation_id: 1)
exit
User.last
User.last
exit
u = User.new
u.save
u.email = "[email protected]"
u
u.save
m = Moderator.new
m.save
m.errors_full_messages
m.errors.full_messages
m.first_name = "kelsey"
m.save
m.errors.full_messages
m.last_name = "hannan"
m.first_name = "kelsey"
m.save
m
m.email = "[email protected]"
m.save
User.last
exit
c
c = Campaign.first
c = Campaign.first
c = Campaign.first
exit
exit
c = Campaign.first
c.draft?
c.state == "draft"
Campaign.update_all(state: :draft)
c.draft?
c = Campaign.first
c.state == "draft"
c.draft?
c.published?
c.publish
c.published?
c.complete
c.expire
c.cancel
c.complete?
c
User.all
c1 = Campaign.user.first
c1 = Campaign.find(1)
c1 = Campaign.find(2)
c1 = Campaign.user_id(1)
Campaign.user_id(1)
Campaign.user_id
c = Campaign.first
c.user_id = 1
c.draft?
c.status
c.state
c2 = Campaign.find(2)
c2.user_id = 1
c2.state
c2.publish
c2.publish?
c2.state
c2.published?
Campaign.update_all(state: :published)
exit
Campaign.find_each(&:save)
Campaign.find_each(&:save)
exit
Campaign.find_each(&:save)
exit
my_array = [1,2,3,4]
method_name = :length
my_array.send(method_name)
@campaign = Campaign.first
@campaign = Campaign.first
association = :reward_levels
@campaign.send(association)
@campaign.save
@campaign
@campaign.reward_levels
@campaign.reward_level
exity
exit
Campaign.find_each(&:save)
exit
exit
User.all
user = User.first
Stage.all
@stage = Stage.first
@stage.question
Question.all
@stage.all
@stage.questions
@stage.questions.answers
@stage.questions.answer
@stage.questions.all
@stage.questions.answers
@stage.questions(1)
@stage.questions[1]
@stage.questions[1].answers
@stage.questions[1].answers("Cafeteria")
@stage.questions[1].answers.find("Cafeteria")
@stage.questions[1].answers.fetch("Cafeteria")
@stage.questions[1].answers.fetch["Cafeteria"]
@stage.questions[1].answers["Cafeteria"]
@stage.questions[1].answers("Cafeteria")
@stage.questions[1].answers(1)
@stage.questions[1].answers[1]
@stage.questions[1].answers[1].correct?
@stage.questions[1].answers[1]
@stage.questions[0].answers[1]
@stage.questions[0].answers
@stage.questions[0].answers[0]
@stage.questions[0].answers[0].correct?
user.stage
user
UserStage.all
UserStage.empty?
User.all
Stage.all
user
us1 = UserMission.new(user_id: 1, mission_id: 1)
us1 = UserMission.new(user_id: 1, mission_id: 1, available: true)
us1.save
UserMission.all
Stage.all
us1 = UserStage.new(user_id: 1, stage_id: 1)
us1 = UserStage.new(user_id: 1, stage_id: 1)
us1.save
us1
us1 = um1
um1 = us1
um1
um1.save
usone = UserStage.new(stage_id: 1, user_id: 1)
exi
exit
user
user = User.first
User.has_finished_stage?
Question.all
user
Stage.questions[1].answers[1]
Stage.all
Stage.questions
Question.all
Question.answers
Question.all
q = Question.first
q.answers
user.userstage
UserStage.all
q.answers
q.answers[2]
q.answers[2].correct?
Stage.questions[1].answers[1]
answer = Stage.first.questions[1].answers[1]
answer = Stage.first.questions[1].answers[1].correct?
answer = Stage.first.questions[1].answers[1].correct?
"quiz".pluralize
exit
y
exit
SecureRandom.hex
SecureRandom.hex
SecureRandom.hex
SecureRandom.hex
SecureRandom.hex
SecureRandom.hex
SecureRandom.hex
SecureRandom.hex
SecureRandom.hex
User.last
User.first
ApiKey.first
u = User.last
u.api_key
rspec spec/
end
ApiKey.first.access_token
y
exit
my_array = [1,2,3,4]
method_name = :length
my_array.send(method_name)
@compaign
@campaign
@campaign = Campaign.first
association = :reward_levels
@campaign.send(association)
my_array.send(method_name)
exit
User.all
user1 = User.first
user1.address
user 2 = User.last
user2 = User.last
user2.address
user2.address = 226 Archibald st.
end
exit
User.all
user1 = User.first
user1.lat
user1.latitude
Campaign.all
c = Campaign.first
c.address = 88 west pender vancouver bc
c.address = "88 west pender vancouver bc"
c.save
u
user1
user1.address
user1.address
Campaign.all
c = Campaign.first
c.reward_levels
user1.address
user1
c
user1.address = "89 west pender vancouver bc"
user1.address
user1.address = "89 west pender vancouver bc"
user1.address = "89 west pender"
exit
y
exit