We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 51654a5 commit af99beeCopy full SHA for af99bee
1 file changed
app/controllers/api/lessons_controller.rb
@@ -11,7 +11,7 @@ def index
11
scope = params[:school_class_id] ? archive_scope.where(school_class_id: params[:school_class_id]) : archive_scope
12
ordered_scope = scope.order(created_at: :asc)
13
14
- accessible_lessons = ordered_scope.accessible_by(current_ability)
+ accessible_lessons = ordered_scope.accessible_by(current_ability).includes(project: :remixes)
15
@lessons_with_users = accessible_lessons.with_users
16
if current_user&.school_teacher?(school) || current_user&.school_owner?(school)
17
render :teacher_index, formats: [:json], status: :ok
0 commit comments