Sha256: ccf1831590f51dca0bbb0169438b41706044e0122e452925aa39499ea58af6c5

Contents?: true

Size: 701 Bytes

Versions: 30

Compression:

Stored size: 701 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 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 set_user!
    @user = current_user
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
mumuki-laboratory-7.7.6 app/controllers/users_controller.rb
mumuki-laboratory-7.7.5 app/controllers/users_controller.rb
mumuki-laboratory-7.7.4 app/controllers/users_controller.rb
mumuki-laboratory-7.8.0 app/controllers/users_controller.rb
mumuki-laboratory-7.7.3 app/controllers/users_controller.rb
mumuki-laboratory-7.7.2 app/controllers/users_controller.rb
mumuki-laboratory-7.7.1 app/controllers/users_controller.rb
mumuki-laboratory-7.7.0 app/controllers/users_controller.rb
mumuki-laboratory-7.6.2 app/controllers/users_controller.rb
mumuki-laboratory-7.6.1 app/controllers/users_controller.rb
mumuki-laboratory-7.6.0 app/controllers/users_controller.rb
mumuki-laboratory-7.5.2 app/controllers/users_controller.rb
mumuki-laboratory-7.5.1 app/controllers/users_controller.rb
mumuki-laboratory-7.5.0 app/controllers/users_controller.rb
mumuki-laboratory-7.4.2 app/controllers/users_controller.rb
mumuki-laboratory-7.4.1 app/controllers/users_controller.rb
mumuki-laboratory-7.4.0 app/controllers/users_controller.rb
mumuki-laboratory-7.3.1 app/controllers/users_controller.rb
mumuki-laboratory-7.3.0 app/controllers/users_controller.rb
mumuki-laboratory-7.2.0 app/controllers/users_controller.rb