Sha256: b6ff55ad83e9d07e8d192a5ea29a5b0065878235a80d16c561c2ad3e69528f06
Contents?: true
Size: 757 Bytes
Versions: 9
Compression:
Stored size: 757 Bytes
Contents
class UsersController < ApplicationController include WithUserParams before_action :authenticate! before_action :set_user! def show @messages = current_user.messages.to_a @watched_discussions = current_user.watched_discussions_in_organization end def update current_user.update_and_notify! user_params redirect_to user_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 def permissible_params super << :avatar_id end private def validate_user_profile! end def set_user! @user = current_user end end
Version data entries
9 entries across 9 versions & 1 rubygems