# HG changeset patch # User luisf # Date 1292504524 0 # Node ID 7366fb57fce9a86d3749ebc8a453898738770c8b # Parent 387ad4f406867f6c3a950c7a77fc04f6865e38d2# Parent e408a3f7089f9503c99c7aedc6dd051a44ffac22 Merge diff -r 387ad4f40686 -r 7366fb57fce9 app/controllers/users_controller.rb --- a/app/controllers/users_controller.rb Wed Dec 15 16:55:54 2010 +0000 +++ b/app/controllers/users_controller.rb Thu Dec 16 13:02:04 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