Sha256: 61e2e2bc60bda828c0e52b96cac277ef0c1bb7c92f1a22291f031c998e06e3c0
Contents?: true
Size: 783 Bytes
Versions: 13
Compression:
Stored size: 783 Bytes
Contents
class Identity::EmailsController < ApplicationController <%- if options.sudoable? -%> before_action :require_sudo <%- end -%> before_action :set_user def edit end def update if @user.update(user_params) redirect_to_root else render :edit, status: :unprocessable_entity end end private def set_user @user = Current.user end def user_params params.permit(:email) end def redirect_to_root if @user.email_previously_changed? resend_email_verification redirect_to root_path, notice: "Your email has been changed" else redirect_to root_path end end def resend_email_verification UserMailer.with(user: @user).email_verification.deliver_later end end
Version data entries
13 entries across 13 versions & 1 rubygems