mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-23 15:19:38 +02:00
Use DB for auth sessions (#1233)
* DB sessions * Validations for profile image
This commit is contained in:
parent
82c298307d
commit
1ffa13f3b3
27 changed files with 118 additions and 76 deletions
|
@ -23,7 +23,7 @@ class Settings::ProfilesController < SettingsController
|
|||
|
||||
def destroy
|
||||
if Current.user.deactivate
|
||||
logout
|
||||
Current.session.destroy
|
||||
redirect_to root_path, notice: t(".success")
|
||||
else
|
||||
redirect_to settings_profile_path, alert: Current.user.errors.full_messages.to_sentence
|
||||
|
@ -31,7 +31,6 @@ class Settings::ProfilesController < SettingsController
|
|||
end
|
||||
|
||||
private
|
||||
|
||||
def user_params
|
||||
params.require(:user).permit(:first_name, :last_name, :profile_image,
|
||||
family_attributes: [ :name, :id ])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue