From c3abe9f8276d48d2ab462cf5357be0e78dcb814b Mon Sep 17 00:00:00 2001 From: fosterfarrell9 <28628554+fosterfarrell9@users.noreply.github.com> Date: Fri, 8 Dec 2023 14:48:36 +0100 Subject: [PATCH] change inverse_of relation --- app/models/course.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/course.rb b/app/models/course.rb index 00cd48d03..a14e466e5 100644 --- a/app/models/course.rb +++ b/app/models/course.rb @@ -15,7 +15,7 @@ class Course < ApplicationRecord # rubocop:todo Rails/HasManyOrHasOneDependent has_many :media, -> { order(position: :asc) }, as: :teachable, - inverse_of: :course + inverse_of: :teachable # rubocop:enable Rails/HasManyOrHasOneDependent # in a course, you can import other media