質問編集履歴

1

誤字

2018/10/17 05:44

投稿

t_54342134142
t_54342134142

スコア11

test CHANGED
File without changes
test CHANGED
@@ -69,3 +69,35 @@
69
69
  end
70
70
 
71
71
  ```
72
+
73
+
74
+
75
+
76
+
77
+ ```
78
+
79
+ omniauth_callbacks_controller.rb
80
+
81
+
82
+
83
+ def twitter
84
+
85
+ @user = User.from_omniauth(request.env["omniauth.auth"].except("extra"))
86
+
87
+
88
+
89
+ if @user.persisted?
90
+
91
+ sign_in_and_redirect @user
92
+
93
+ else
94
+
95
+ session["devise.user_attributes"] = @user.attributes
96
+
97
+ redirect_to new_user_registration_url
98
+
99
+ end
100
+
101
+ end
102
+
103
+ ```