class Wco::ReportsController

def create

def create
  params[:report][:tag_ids]&.delete ''
  @report = Wco::Report.new params[:report].permit!
  authorize! :create, @report
  @report.author = current_profile
  if @report.save
    flash_notice "created report"
  else
    flash_alert "Cannot create report: #{@report.errors.messages}"
  end
  redirect_to action: 'index'
end