From 4b7d55cbef879e785fec2651f948f2d42c498aad Mon Sep 17 00:00:00 2001 From: Alec Zhou Date: Sat, 11 May 2019 15:42:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E5=BB=BAopeni=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E4=B9=8B=E5=90=8E=E5=BB=BA=E7=AB=8B=E8=B5=B7user=E4=B8=8Eopeni?= =?UTF-8?q?=E4=B9=8B=E9=97=B4=E7=9A=84=E8=81=94=E7=B3=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/oauth_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/oauth_controller.rb b/app/controllers/oauth_controller.rb index 714bd610..f2a797b7 100644 --- a/app/controllers/oauth_controller.rb +++ b/app/controllers/oauth_controller.rb @@ -196,6 +196,8 @@ class OauthController < ApplicationController UserExtensions.create!(user_id: user.id, school_id: School.first.id, identity: 4, gender: 0) openi = Openi.create!(user_id: user.id, openi_user_id: openi_user_id, avatar_url: avatar_url, login: login, name: name, email: email) + openi.user = user + openi.save! end end