An alternative would be to do something like
routes.rb
resources :course_catgeories do
resources :courses
end
courses_controller.rb
def index
@course_category = CourseCategory.find(params[:course_category_id])
@courses = @course_category.courses
end
The logic here being, if you're listing courses for a category, then the conventional action for that is the index action. Except in this case, you're scoping the listing to a particular category. So if you think about it in those terms, I think this approach better models your domain.
This approach effectively produces the following routes:
/course_categories/ (category index page)
/course_categories/1 (category show page)
/course_categories/1/courses (course index page)
/course_categories/1/courses/1 (course show page)