Sha256: a3924e3c23433adfaeb8ef46d1433bed85ff5fbbf7dc856be22936c89d788bad
Contents?: true
Size: 487 Bytes
Versions: 2
Compression:
Stored size: 487 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_path, notice: "Your email has been changed" else render :edit, status: :unprocessable_entity end end private def set_user @user = Current.user end def user_params params.permit(:email) end end
Version data entries
2 entries across 2 versions & 1 rubygems