Class: WithAccounts::Jwts::RefreshTokensCreating::UpdateAccount

Inherits:
LetsDoThis::Act
  • Object
show all
Defined in:
app/scenarios/with_accounts/jwts/refresh_tokens_creating/update_account.rb

Instance Method Summary collapse

Instance Method Details

#instructions(stage) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
# File 'app/scenarios/with_accounts/jwts/refresh_tokens_creating/update_account.rb', line 6

def instructions(stage)
  saved_72_char_version = stage.new_token[0..71]

  update = stage..update(login_invitation: '',
                                refresh_token: saved_72_char_version,
                                refresh_token_confirmation: saved_72_char_version,
                                login_at: Time.now)

  errors.add(error_key, 'err') unless update

  NOTHING_NEW
end