Sha256: 2b79b9e6454a83d12e597091593738383e8328639ebc949195fc3f366cfa721a
Contents?: true
Size: 701 Bytes
Versions: 8
Compression:
Stored size: 701 Bytes
Contents
class Identity::EmailsController < ApplicationController 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, :password_challenge).with_defaults(password_challenge: "") 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
8 entries across 8 versions & 1 rubygems