|
|
|
@ -144,14 +144,16 @@ class AccountController < ApplicationController
|
|
|
|
|
|
|
|
|
|
#added by bai
|
|
|
|
|
unless @user.id.nil?
|
|
|
|
|
ue = UserExtensions.create(:identity => params[:identity].to_i,:technical_title => params[:technical_title], :gender => params[:gender].to_i, :user_id => @user.id, :student_id => params[:no])
|
|
|
|
|
unless params[:province].nil? || params[:city].nil?
|
|
|
|
|
ue.location = params[:province]
|
|
|
|
|
ue.location_city = params[:city]
|
|
|
|
|
ue.save
|
|
|
|
|
end
|
|
|
|
|
ue = @user.extensions
|
|
|
|
|
|
|
|
|
|
ue.identity = params[:identity]
|
|
|
|
|
ue.technical_title = params[:technical_title]
|
|
|
|
|
ue.gender = params[:gender]
|
|
|
|
|
ue.student_id = params[:no]
|
|
|
|
|
ue.location = params[:province]
|
|
|
|
|
ue.location_city = params[:city]
|
|
|
|
|
@user.save
|
|
|
|
|
end
|
|
|
|
|
#end
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|