Mercurial > hg > soundsoftware-site
diff app/controllers/users_controller.rb @ 160:7eb2194ee428 feature_55
. institution field correctly handled in the user edit and show forms, and in the register view;
author | luisf |
---|---|
date | Fri, 28 Jan 2011 18:44:56 +0000 |
parents | e71a969c151a |
children | bad82329a115 |
line wrap: on
line diff
--- a/app/controllers/users_controller.rb Thu Jan 27 18:46:29 2011 +0000 +++ b/app/controllers/users_controller.rb Fri Jan 28 18:44:56 2011 +0000 @@ -54,8 +54,14 @@ if @user.ssamr_user_detail != nil @description = @user.ssamr_user_detail.description - if @user.ssamr_user_detail.institution_id != nil - @institution_name = Institution.find(@user.ssamr_user_detail.institution_id).name + + if @user.ssamr_user_detail.institution_type != nil + # institution_type is true for listed institutions + if (@user.ssamr_user_detail.institution_type) + @institution_name = Institution.find(@user.ssamr_user_detail.institution_id).name + else + @institution_name = @user.ssamr_user_detail.other_institution + end end end