# HG changeset patch # User Chris Cannam # Date 1292504656 0 # Node ID fb3d7118d65ffac12af2b55d782cf47d4fd37310 # Parent d357e6b0b8e36b7e17f6436059f0cdc3596a71a6# Parent 7366fb57fce9a86d3749ebc8a453898738770c8b Merge from branch "luisf" diff -r d357e6b0b8e3 -r fb3d7118d65f app/controllers/users_controller.rb --- a/app/controllers/users_controller.rb Thu Dec 16 11:41:32 2010 +0000 +++ b/app/controllers/users_controller.rb Thu Dec 16 13:04:16 2010 +0000 @@ -51,9 +51,11 @@ def show @user = User.find(params[:id]) + + if @user.ssamr_user_detail != nil + @description = @user.ssamr_user_detail.description + end - @description = @user.ssamr_user_detail.description - # show projects based on current user visibility @memberships = @user.memberships.all(:conditions => Project.visible_by(User.current)) @@ -155,7 +157,14 @@ @user.pref.attributes = params[:pref] @user.pref[:no_self_notified] = (params[:no_self_notified] == '1') - @ssamr_user_details = @user.ssamr_user_detail + if @user.ssamr_user_detail == nil + @ssamr_user_details = SsamrUserDetail.new() + @user.ssamr_user_detail = @ssamr_user_details + else + @ssamr_user_details = @user.ssamr_user_detail + end + + if params[:ssamr_user_details].nil? or params[:ssamr_user_details].empty? @ssamr_user_details.description = @user.ssamr_user_detail.description else