approve name change requests by default

This commit is contained in:
r888888888
2014-11-06 17:45:44 -08:00
parent 8096fd388c
commit 5a153221c5

View File

@@ -18,7 +18,8 @@ class UserNameChangeRequestsController < ApplicationController
if @change_request.errors.any?
render :action => "new"
else
redirect_to user_name_change_request_path(@change_request), :notice => "Your request has been submitted and is pending admin review"
@change_request.approve!
redirect_to user_name_change_request_path(@change_request), :notice => "Your name has been changed"
end
end