Class: Auth::CustomerInvitationsController

Inherits:
Devise::InvitationsController
  • Object
show all
Defined in:
app/controllers/auth/customer_invitations_controller.rb

Overview

Controller: customer invitations.

Instance Method Summary collapse

Instance Method Details

#after_accept_path_for(_resource) ⇒ String (protected)

Returns where to land the account after accepting its invitation.

Parameters:

  • _resource (Account)

    the invited account (unused; path depends only on the return path)

Returns:

  • (String)

    where to land the account after accepting its invitation



18
19
20
# File 'app/controllers/auth/customer_invitations_controller.rb', line 18

def after_accept_path_for(_resource)
  @return_path || 
end

#qualify_customervoid (protected)

This method returns an undefined value.

after_action on #update (invitation acceptance) — qualifies the lead
once the account is fully enabled.



26
27
28
29
30
# File 'app/controllers/auth/customer_invitations_controller.rb', line 26

def qualify_customer
  return unless @account.fully_enabled?

  @context_user.qualify_lead
end

#set_report_errors_forObject (protected)

This controller instance set the model to use for detecting errors in the application_controller#write_flash_to_cookie method.



12
13
14
# File 'app/controllers/auth/customer_invitations_controller.rb', line 12

def set_report_errors_for
  @report_errors_for = [resource]
end