Mercurial > hg > soundsoftware-site
comparison app/controllers/users_controller.rb @ 104:0511601cda6b luisf
DEV commit: editing the show method in the users controller
author | luisf |
---|---|
date | Thu, 16 Dec 2010 18:16:47 +0000 |
parents | e408a3f7089f |
children | 361f1e8b2e23 |
comparison
equal
deleted
inserted
replaced
103:d206f38ae405 | 104:0511601cda6b |
---|---|
52 def show | 52 def show |
53 @user = User.find(params[:id]) | 53 @user = User.find(params[:id]) |
54 | 54 |
55 if @user.ssamr_user_detail != nil | 55 if @user.ssamr_user_detail != nil |
56 @description = @user.ssamr_user_detail.description | 56 @description = @user.ssamr_user_detail.description |
57 if @user.ssamr_user_detail.institution_id != nil | |
58 @institution = @institution.find(@user.ssamr_user_detail.institution_id) | |
59 end | |
57 end | 60 end |
58 | 61 |
59 # show projects based on current user visibility | 62 # show projects based on current user visibility |
60 @memberships = @user.memberships.all(:conditions => Project.visible_by(User.current)) | 63 @memberships = @user.memberships.all(:conditions => Project.visible_by(User.current)) |
61 | 64 |