Class: Iron::Sessions::TransfersController

Inherits:
ApplicationController show all
Defined in:
app/controllers/iron/sessions/transfers_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



8
9
# File 'app/controllers/iron/sessions/transfers_controller.rb', line 8

def show
end

#updateObject



11
12
13
14
15
16
17
18
19
20
# File 'app/controllers/iron/sessions/transfers_controller.rb', line 11

def update
  person = Person.find_by_transfer_id(params[:id])

  if person&.active?
    start_new_session_for person.user
    redirect_to after_authentication_url
  else
    redirect_to , alert: "Transfer link is invalid or has expired."
  end
end