Class: Auth::CustomerInvitationsController
- Inherits:
-
Devise::InvitationsController
- Object
- Devise::InvitationsController
- Auth::CustomerInvitationsController
- Defined in:
- app/controllers/auth/customer_invitations_controller.rb
Overview
Controller: customer invitations.
Instance Method Summary collapse
-
#after_accept_path_for(_resource) ⇒ String
protected
Where to land the account after accepting its invitation.
-
#qualify_customer ⇒ void
protected
after_actionon #update (invitation acceptance) — qualifies the lead once the account is fully enabled. -
#set_report_errors_for ⇒ Object
protected
This controller instance set the model to use for detecting errors in the application_controller#write_flash_to_cookie method.
Instance Method Details
#after_accept_path_for(_resource) ⇒ String (protected)
Returns 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 || my_account_path end |
#qualify_customer ⇒ void (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_for ⇒ Object (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 |