Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
24172c85c8
|
@ -143,13 +143,17 @@ class AccountController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
#added by bai
|
#added by bai
|
||||||
unless @user.id.nil?
|
if @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])
|
ue = @user.user_extensions ||= UserExtensions.new
|
||||||
unless params[:province].nil? || params[:city].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 => )
|
||||||
ue.location = params[:province]
|
ue.identity = params[:identity].to_i
|
||||||
ue.location_city = params[:city]
|
ue.technical_title = params[:technical_title]
|
||||||
ue.save
|
ue.gender = params[:gender].to_i
|
||||||
end
|
ue.user_id = @user.id
|
||||||
|
ue.student_id = params[:no]
|
||||||
|
ue.location = params[:province] if params[:province] != nil
|
||||||
|
ue.location_city = params[:city] if params[:city] != nil
|
||||||
|
ue.save
|
||||||
end
|
end
|
||||||
#end
|
#end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue