Module: Plutonium::Invites::PendingInviteCheck

Extended by:
ActiveSupport::Concern
Defined in:
lib/plutonium/invites/pending_invite_check.rb

Overview

PendingInviteCheck provides post-login invitation handling.

Include this in a controller that users land on after login (e.g., WelcomeController, DashboardController) to check for pending invitations stored in cookies.

Examples:

Basic usage

class WelcomeController < ApplicationController
  include Plutonium::Invites::PendingInviteCheck

  def index
    return if redirect_to_pending_invite!

    # Normal post-login flow...
    redirect_to dashboard_path
  end

  private

  def invite_class
    Invites::UserInvite
  end
end