Skip to content

Instantly share code, notes, and snippets.

View prfraser's full-sized avatar
🎯
Focusing

Philip Fraser prfraser

🎯
Focusing
  • Brisbane, Australia
View GitHub Profile
def save_report
result = SaveReportService.call(@report_params)
if result.success?
redirect_to workforce_report_path(result.report.report_key, params: { saved_report_id: result.report.id }),
notice: "Report saved successfully"
else
redirect_to workforce_report_path(params[:id]), alert: result.error_message
end
end