Class: Crm::Reports::SourcesReportController

Inherits:
CrmController
  • Object
show all
Includes:
Controllers::ReportCommandFlashable
Defined in:
app/controllers/crm/reports/sources_report_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



6
7
8
9
10
11
12
13
14
15
16
# File 'app/controllers/crm/reports/sources_report_controller.rb', line 6

def show
  @report_command = ::Report::SourcesReport::SourcesReportCommand.new(sources_report_command_params)
  @result = @report_command.execute

  flash_report_command_errors
  flash.now[:warning] = @report_command.warnings.join('.') if @report_command.warnings.any?
  respond_to do |format|
    format.html
    format.turbo_stream
  end
end