Skip to content

Commit e736080

Browse files
authored
Fix remix identifier n+1 (#631)
## Status closes RaspberryPiFoundation/digital-editor-issues#1034 ## Notes This was tech debt left over from the refactor to return remix identifiers with the lesson list so students can link straight to their work (#608)
1 parent c8018a9 commit e736080

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)