Rails アプリケーションを開発し、簡単なルートを追加しました。
Name::Application.routes.draw do
resource :categories
end
問題は、生成された URL にメンバー ID がないことです。
$ rake routes
categories POST /categories(.:format) categories#create
new_categories GET /categories/new(.:format) categories#new
edit_categories GET /categories/edit(.:format) categories#edit
GET /categories(.:format) categories#show
PUT /categories(.:format) categories#update
DELETE /categories(.:format) categories#destroy
Rails 3.2.3 を使用しています。アプリケーションで ActiveRecord を使用していません (ただし、関連性があるかどうかはわかりません)。私はモデルを持っていCategory
ますCategoriesController
。
何が問題なのですか?