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
哪兒了我錯了?