Skip to content

Commit ea75b25

Browse files
iHiDclaude
andauthored
Fix UrlGenerationError when visiting invalid course slug (#8610)
When visiting /courses/<invalid-slug>, the use_course! callback tried to redirect to a non-existent :coding_fundamentals action, causing an ActionController::UrlGenerationError. Redirect to jiki_url instead, consistent with other redirects in the controller. Closes #8592 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c956170 commit ea75b25

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/controllers/courses_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def redirect_non_members_to_jiki!
129129
def use_course!
130130
@bundle = Courses::BundleCodingFrontEnd.instance
131131
@course = Courses::Course.course_for_slug(params[:id])
132-
redirect_to action: :coding_fundamentals unless @course
132+
redirect_to jiki_url unless @course
133133
end
134134

135135
def use_enrollment!

0 commit comments

Comments
 (0)