Mercurial > hg > soundsoftware-site
comparison app/controllers/users_controller.rb @ 142:e6ed6c7a2ce9 luisf
corrected bug in the institution field while creating a new user.
author | luisf |
---|---|
date | Thu, 20 Jan 2011 14:06:23 +0000 |
parents | d70a0b926135 |
children | 6bd9b26ebd07 |
comparison
equal
deleted
inserted
replaced
141:ab75f33dcc6f | 142:e6ed6c7a2ce9 |
---|---|
83 | 83 |
84 @user = User.new(:language => Setting.default_language) | 84 @user = User.new(:language => Setting.default_language) |
85 @auth_sources = AuthSource.find(:all) | 85 @auth_sources = AuthSource.find(:all) |
86 | 86 |
87 @ssamr_user_details = SsamrUserDetail.new | 87 @ssamr_user_details = SsamrUserDetail.new |
88 | |
89 # default value | |
90 @selected_institution_id = 1 | |
91 | |
88 | 92 |
89 end | 93 end |
90 | 94 |
91 verify :method => :post, :only => :create, :render => {:nothing => true, :status => :method_not_allowed } | 95 verify :method => :post, :only => :create, :render => {:nothing => true, :status => :method_not_allowed } |
92 def create | 96 def create |
132 @user = User.find(params[:id]) | 136 @user = User.find(params[:id]) |
133 @notification_options = @user.valid_notification_options | 137 @notification_options = @user.valid_notification_options |
134 @notification_option = @user.mail_notification | 138 @notification_option = @user.mail_notification |
135 | 139 |
136 @ssamr_user_details = @user.ssamr_user_detail | 140 @ssamr_user_details = @user.ssamr_user_detail |
141 @selected_institution_id = @user.ssamr_user_detail.institution_id.to_i | |
137 | 142 |
138 @auth_sources = AuthSource.find(:all) | 143 @auth_sources = AuthSource.find(:all) |
139 @membership ||= Member.new | 144 @membership ||= Member.new |
140 end | 145 end |
141 | 146 |