Module: Controllers::CommunicationsTab

Extended by:
ActiveSupport::Concern
Included in:
CommunicationsController, CustomersController, OpportunitiesController, OrdersController, QuotesController
Defined in:
app/concerns/controllers/communications_tab.rb

Overview

Shared query logic for the "Communications" tab content rendered on
Quote / Order / Opportunity / Customer (and other) show pages and
inline-fetched by their respective tab_communications actions.

Inclusion gives the host controller a private
build_communications_tab_data helper that assigns the four instance
variables the communications/_index partial reads:

@context_object — the parent (Quote/Order/Opportunity/…)
@q — Ransack search object scoped to the context's
communications (or all_related_communications
when the parent aggregates across associated
records)
@pagy — Pagy::Pagy paginator
@communications — paginated, includes-eager-loaded result set