noesya/osuny

View on GitHub
app/controllers/admin/education/programs/teachers_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
D
60%
class Admin::Education::Programs::TeachersController < Admin::Education::Programs::ApplicationController
  load_and_authorize_resource :involvement,
                              class: University::Person::Involvement,
                              through: :program,
                              through_association: :university_person_involvements,
                              parent: false

  def destroy
    @involvement.destroy
    redirect_back fallback_location: admin_education_program_path(@program), notice: t('admin.successfully_quit_html', model: @involvement.to_s_in(current_language), target: @involvement.target.to_s_in(current_language))
  end

end