Wrap UsersController to not 500 when no params are submitted

This commit is contained in:
Raphael Sofaer 2011-05-19 17:00:53 -07:00
parent c95ce3bd0c
commit ed61c53e09

View file

@ -22,7 +22,7 @@ class UsersController < ApplicationController
def update
password_changed = false
u = params[:user]
if u = params[:user]
@user = current_user
u.delete(:password) if u[:password].blank?
@ -54,6 +54,7 @@ class UsersController < ApplicationController
@user.aspects.where(:id => u[:a_ids]).update_all(:open => true)
end
end
end
respond_to do |format|
format.js{