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