Skip to content
Snippets Groups Projects
Unverified Commit 44329e48 authored by Sébastien Gaya's avatar Sébastien Gaya
Browse files

hotfix school

parent 49c5756d
No related branches found
No related tags found
No related merge requests found
......@@ -47,7 +47,7 @@ class Admin::Education::SchoolsController < Admin::Education::ApplicationControl
def destroy
@school.destroy_and_sync
redirect_to admin_university_schools_url, notice: t('admin.successfully_destroyed_html', model: @school.to_s)
redirect_to admin_education_schools_url, notice: t('admin.successfully_destroyed_html', model: @school.to_s)
end
private
......
......@@ -4,7 +4,8 @@ module Education::School::WithAlumni
included do
has_many :education_cohorts,
class_name: 'Education::Cohort'
class_name: 'Education::Cohort',
dependent: :destroy
alias_attribute :cohorts, :education_cohorts
has_many :alumni, -> { distinct },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment