Sha256: 11bac4b10e0699372bbf21e37c6d001af149697ee5ea18e2660a8481bdfb4b1d
Contents?: true
Size: 717 Bytes
Versions: 13
Compression:
Stored size: 717 Bytes
Contents
class Identity::EmailsController < ApplicationController <%- if options.sudoable? -%> before_action :require_sudo <%- end -%> before_action :set_user def update if @user.update(user_params) render_show else render json: @user.errors, status: :unprocessable_entity end end private def set_user @user = Current.user end def user_params params.permit(:email) end def render_show if @user.email_previously_changed? resend_email_verification; render(json: @user) else render json: @user 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