Class: Rails::Auth::ProfilesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/rails/auth/profiles_controller.rb

Instance Method Summary collapse

Instance Method Details

#editObject



4
5
6
# File 'app/controllers/rails/auth/profiles_controller.rb', line 4

def edit
  @user = current_user
end

#updateObject



8
9
10
11
12
13
14
15
# File 'app/controllers/rails/auth/profiles_controller.rb', line 8

def update
  @user = current_user
  if @user.update(profile_params)
    redirect_to security_sessions_path, notice: "Profile updated successfully."
  else
    render :edit, status: :unprocessable_entity
  end
end