BathHacked/energy-sparks

View on GitHub
app/controllers/admin/content_generation_run_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
F
0%
module Admin
  class ContentGenerationRunController < AdminController
    def create
      school = School.find(params[:school_id])
      Alerts::GenerateContent.new(school).perform
      redirect_back fallback_location: admin_alert_types_path, notice: "Content regenerated for #{school.name}"
    end
  end
end