缺少:在创建资源
问题描述:
我rake routes
ID航线创建资源后:文章说我应该得到:缺少:在创建资源
Prefix Verb URI Pattern Controller#Action
articles GET /articles(.:format) articles#index
POST /articles(.:format) articles#create
new_article GET /articles/new(.:format) articles#new
edit_article GET /articles/:id/edit(.:format) articles#edit
article GET /articles/:id(.:format) articles#show
PATCH /articles/:id(.:format) articles#update
PUT /articles/:id(.:format) articles#update
DELETE /articles/:id(.:format) articles#destroy
root GET / welcome#index
但是我的路线总是缺少那些有:ID在其中。
Prefix Verb URI Pattern Controller#Action
articles POST /articles(.:format) articles#create
new_articles GET /articles/new(.:format) articles#new
edit_articles GET /articles/edit(.:format) articles#edit
GET /articles(.:format) articles#show
PATCH /articles(.:format) articles#update
PUT /articles(.:format) articles#update
DELETE /articles(.:format) articles#destroy
root GET / welcome#index
您可以发布您的路线文件吗? – adamliesko
确保您使用的是资源:文章,而不是资源:文章 –