Mercurial > hg > soundsoftware-site
changeset 93:7366fb57fce9 luisf
Merge
author | luisf |
---|---|
date | Thu, 16 Dec 2010 13:02:04 +0000 |
parents | 387ad4f40686 (current diff) e408a3f7089f (diff) |
children | fb3d7118d65f 5467cbbf393b |
files | |
diffstat | 1 files changed, 12 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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