fix bug with user name change requests

This commit is contained in:
albert
2013-04-02 10:15:55 -04:00
parent 76487c46fb
commit c08268f7b3

View File

@@ -43,7 +43,7 @@ class UserNameChangeRequest < ActiveRecord::Base
end end
def approve! def approve!
update_attribute(:status, "approved") update_attributes(:status => "approved", :approver_id => CurrentUser.user.id)
user.update_attribute(:name, desired_name) user.update_attribute(:name, desired_name)
body = "Your name change request has been approved. Be sure to log in with your new user name." body = "Your name change request has been approved. Be sure to log in with your new user name."
Dmail.create_split(:title => "Name change request approved", :body => body, :to_id => user_id) Dmail.create_split(:title => "Name change request approved", :body => body, :to_id => user_id)