0
我有一个SubcategoriesController'未初始化的常量SubcategoriesController' - Rails的
class Categories::SubcategoriesController < ApplicationController
def new
@category = Category.find(params[:category_id])
@subcategory = Subcategory.new
end
def edit
end
def create
end
def destroy
end
end
这是我的路线
resources :categories do
resources :subcategories, except: [:index, :show]
end
当我试图访问categories_path
,它抛出uninitialized constant SubcategoriesController
哪儿了我错了?