updated settings templates

This commit is contained in:
Alex Turchyn
2023-05-31 23:49:19 +03:00
parent 4a303cb423
commit 97a712d888
12 changed files with 154 additions and 117 deletions
+23
View File
@@ -0,0 +1,23 @@
# frozen_string_literal: true
class ProfileController < ApplicationController
def index
@user = current_user
end
def update
@user = current_user
if @user.update(user_params)
redirect_to settings_profile_path, notice: 'Profile updated'
else
render :index
end
end
private
def user_params
params.require(:user).permit(:first_name, :last_name)
end
end