Skip to content

Routes incorrect when linking to courses, lessons, and lesson_pages

We scope lessons to courses, and lesson_pages to lessons. Which makes the slug unique in those scopes. But the routes we used did not take into account that any particular slug of say a lesson is not necessarily unique across the system. Doing a regular find on the slug will not work.

Updated the routes to use the proper scoping and objects.

Also fixed same issue when commenting on a lesson_page. Commenting on one could end up adding the comment to a different lesson_page with the same slug.

Closes #40 (closed)

Edited by rubyjunkie

Merge request reports