Skip to content

Commit

Permalink
feat(kid sign-in): add remember me for kid user (#326)
Browse files Browse the repository at this point in the history
  • Loading branch information
VladislavSokov authored Dec 12, 2023
1 parent 46a3fe4 commit e1ab4d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/my_accounts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class MyAccountsController < ApplicationController
before_action :authenticate_user!

def show
redirect_to account_path(shared_accounts.accepted.first) unless current_user.parent?
redirect_to account_path(shared_accounts.first) unless current_user.parent?
end

private
Expand Down
2 changes: 2 additions & 0 deletions app/services/kids_user_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ def create_user
ActiveRecord::Base.transaction do
user = User.create(email: email, password: parental_key, parental_key: parental_key)
user.create_account(name: email, email: email)
user.remember_me = true

user
end
end
Expand Down

0 comments on commit e1ab4d3

Please sign in to comment.