Module: Controllers::ReportCommandFlashable

Extended by:
ActiveSupport::Concern
Included in:
Crm::Reports::AccountingRecordsController, Crm::Reports::ActivityPerformanceController, Crm::Reports::BalanceSheetController, Crm::Reports::BookOfBusinessController, Crm::Reports::CallBreakdownController, Crm::Reports::CallStatisticsController, Crm::Reports::CampaignsReportController, Crm::Reports::CashFlowController, Crm::Reports::ConversionReportController, Crm::Reports::CostCenterController, Crm::Reports::CouponSalesReportController, Crm::Reports::CustomerPerformanceController, Crm::Reports::GrossSalesReportController, Crm::Reports::ItemMovedToScrapReportController, Crm::Reports::ItemSaleController, Crm::Reports::KpiCallController, Crm::Reports::KpiTimeOnTaskController, Crm::Reports::LeadReportController, Crm::Reports::OpportunitiesReportController, Crm::Reports::OpportunitiesVsLogisticsController, Crm::Reports::OrdersReportController, Crm::Reports::PhoneQueueReportController, Crm::Reports::PresenceController, Crm::Reports::ProfileDiscountController, Crm::Reports::ProfitLossController, Crm::Reports::ReconciliationController, Crm::Reports::RmasReportController, Crm::Reports::SalesCommissionsController, Crm::Reports::SalesProfitController, Crm::Reports::SalesRepRankingController, Crm::Reports::ShippingRatesController, Crm::Reports::SmartServicesController, Crm::Reports::SourcesReportController, Crm::Reports::TechCallsReportController, Crm::Reports::TechProductivityController
Defined in:
app/concerns/controllers/report_command_flashable.rb

Overview

Surface validation errors on @report_command via flash.now so they reach the
user through TurboStreamFlashable for turbo_stream responses, and through the
layout's flash partial for HTML responses.

Usage in a report controller:

def show
@report_command = ::Report::Foo::FooCommand.new(foo_params)
@result = @report_command.execute
flash_report_command_errors
respond_to do |format|
format.html
format.turbo_stream
end
end