# HG changeset patch # User Chris Cannam # Date 1296747297 0 # Node ID 752184172a34249ec94405b9b8e01652f58e03d8 # Parent 011f2ec6018feb6f283ec3e6022c68847d00c9d3# Parent 594ed6aef7bdac3cdef023df68f129e67a06d93e Merge from branch "feature_55" diff -r 011f2ec6018f -r 752184172a34 app/controllers/my_controller.rb --- a/app/controllers/my_controller.rb Thu Feb 03 15:34:42 2011 +0000 +++ b/app/controllers/my_controller.rb Thu Feb 03 15:34:57 2011 +0000 @@ -54,8 +54,6 @@ @pref = @user.pref @ssamr_user_details = @user.ssamr_user_detail - @selected_institution_id = @ssamr_user_details.institution_id.to_i - if request.post? @user.attributes = params[:user] @user.mail_notification = params[:notification_option] || 'only_my_events' @@ -65,8 +63,10 @@ if @user.ssamr_user_detail == nil @ssamr_user_details = SsamrUserDetail.new() @user.ssamr_user_detail = @ssamr_user_details + @selected_institution_id = NULL else @ssamr_user_details = @user.ssamr_user_detail + @selected_institution_id = @ssamr_user_details.institution_id.to_i end diff -r 011f2ec6018f -r 752184172a34 app/controllers/users_controller.rb --- a/app/controllers/users_controller.rb Thu Feb 03 15:34:42 2011 +0000 +++ b/app/controllers/users_controller.rb Thu Feb 03 15:34:57 2011 +0000 @@ -140,7 +140,11 @@ @ssamr_user_details = @user.ssamr_user_detail - @selected_institution_id = @user.ssamr_user_detail.institution_id.to_i + if @user.ssamr_user_detail == nil + @selected_institution_id = nil + else + @selected_institution_id = @user.ssamr_user_detail.institution_id.to_i + end @auth_sources = AuthSource.find(:all) @membership ||= Member.new diff -r 011f2ec6018f -r 752184172a34 app/views/my/account.rhtml --- a/app/views/my/account.rhtml Thu Feb 03 15:34:42 2011 +0000 +++ b/app/views/my/account.rhtml Thu Feb 03 15:34:57 2011 +0000 @@ -1,4 +1,6 @@ <%= javascript_include_tag "ssamr_institutions" %> +<%= javascript_include_tag "ssamr_registration" %> +