Skip to content

Commit af99bee

Browse files
committed
including project remixes when lesson loaded from db
1 parent 51654a5 commit af99bee

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/controllers/api/lessons_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def index
1111
scope = params[:school_class_id] ? archive_scope.where(school_class_id: params[:school_class_id]) : archive_scope
1212
ordered_scope = scope.order(created_at: :asc)
1313

14-
accessible_lessons = ordered_scope.accessible_by(current_ability)
14+
accessible_lessons = ordered_scope.accessible_by(current_ability).includes(project: :remixes)
1515
@lessons_with_users = accessible_lessons.with_users
1616
if current_user&.school_teacher?(school) || current_user&.school_owner?(school)
1717
render :teacher_index, formats: [:json], status: :ok

0 commit comments

Comments
 (0)