-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path@user
18 lines (15 loc) · 1.12 KB
/
@user
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[1mFrom:[0m /mnt/c/Users/Perl/dev/flatiron/labs/SPOTS/app/controllers/sessions_controller.rb:30 SessionsController#facebook:
[1;34m25[0m: [32mdef[0m [1;34mfacebook[0m
[1;34m26[0m: @user = [1;34;4mUser[0m.find_or_create_by([35muid[0m: auth[[31m[1;31m'[0m[31muid[1;31m'[0m[31m[0m]) [32mdo[0m |u|
[1;34m27[0m: u.username = auth[[31m[1;31m'[0m[31minfo[1;31m'[0m[31m[0m][[31m[1;31m'[0m[31mname[1;31m'[0m[31m[0m]
[1;34m28[0m: u.email = auth[[31m[1;31m'[0m[31minfo[1;31m'[0m[31m[0m][[31m[1;31m'[0m[31memail[1;31m'[0m[31m[0m]
[1;34m29[0m: u.password = auth[[31m[1;31m'[0m[31muid[1;31m'[0m[31m[0m]
=> [1;34m30[0m: binding.pry
[1;34m31[0m: [32mend[0m
[1;34m32[0m: [32mif[0m session[[33m:user_id[0m] = @user.id
[1;34m33[0m: redirect_to user_path(@user)
[1;34m34[0m: [32melse[0m
[1;34m35[0m: flash[[33m:error[0m] = [31m[1;31m"[0m[31mSomething went wrong![1;31m"[0m[31m[0m
[1;34m36[0m: redirect_to login_url
[1;34m37[0m: [32mend[0m
[1;34m38[0m: [32mend[0m