Sha256: 42e59c905d06bd5649ce646fdce962be47b829db2960ad770d7110c1f0a5b3ec
Contents?: true
Size: 683 Bytes
Versions: 20
Compression:
Stored size: 683 Bytes
Contents
class UsersController < ApplicationController before_action :authenticate! before_action :set_user! def show @messages = current_user.messages || [] end def update current_user.update_and_notify! user_params redirect_to root_path, notice: I18n.t(:user_data_updated) end def unsubscribe user_id = User.unsubscription_verifier.verify(params[:id]) User.find(user_id).unsubscribe_from_reminders! redirect_to root_path, notice: t(:unsubscribed_successfully) end private def validate_user_profile! end def user_params params.require(:user).permit(:first_name, :last_name) end def set_user! @user = current_user end end
Version data entries
20 entries across 20 versions & 1 rubygems