You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: reports_controller.rb
    path of file: ./repos/onebody/app/controllers
    
    the code of the file until where you have to start completion: class ReportsController < ApplicationController
  REPORTS = {
    'attendance_totals'     => AttendanceTotalsReport,
    'group_contact_details' => GroupContactDetailsReport,
    'weekly_attendance'     => WeeklyAttendanceReport
  }.freeze

  def show
    report_class = REPORTS[params[:id]]
    raise ActiveRec
    
  def show
    report_class = REPORTS[params[:id]]
    raise ActiveRecord::RecordNotFound unless report_class
    @report = report_class.new(params.to_unsafe_h[:options] || {})
    respond_to do |format|
      format.html do
        render file: Rails.root.join('app/views/reports', params[:id] + '.html.haml')
      end
      format.csv do
        send_data @report.to_csv, filename: params[:id] + '.csv', type: 'text/csv'
      end
    end
  end