This commit is contained in:
r888888888
2013-05-21 17:52:03 -07:00
parent d1f2f1c09a
commit eab2eb1d82
6 changed files with 112 additions and 2 deletions

View File

@@ -0,0 +1,18 @@
module Maintenance
module User
class EmailChangesController < ApplicationController
def new
end
def create
email_change = UserEmailChange.new(CurrentUser.user, params[:email_change][:email], params[:email_change][:password])
if email_change.process
redirect_to(edit_user_path(CurrentUser.user.id), :notice => "Email was updated")
else
flash[:notice] = "Password was incorrect"
render :action => "new"
end
end
end
end
end