Module: AcceptsPendingInvitations

Extended by:
ActiveSupport::Concern
Included in:
ConfirmationsController, RegistrationsController
Defined in:
app/controllers/concerns/accepts_pending_invitations.rb

Instance Method Summary collapse

Instance Method Details

#accept_pending_invitationsObject


6
7
8
9
10
# File 'app/controllers/concerns/accepts_pending_invitations.rb', line 6

def accept_pending_invitations
  return unless resource.active_for_authentication?

  clear_stored_location_for_resource if resource.accept_pending_invitations!.any?
end

#clear_stored_location_for_resourceObject


12
13
14
15
16
# File 'app/controllers/concerns/accepts_pending_invitations.rb', line 12

def clear_stored_location_for_resource
  session_key = stored_location_key_for(resource)

  session.delete(session_key)
end