好吧,我一直在听讲座,如果对不起,我不确定这是否是错误的地方。
但是当我跑步时
rake routes
在rails上使用红宝石我得到
movies GET /movies(.:format) movies#index
POST /movies(.:format) movies#create
new_movie GET /movies/new(.:format) movies#new
edit_movie GET /movies/:id/edit(.:format) movies#edit
movie GET /movies/:id(.:format) movies#show
PUT /movies/:id(.:format) movies#update
DELETE /movies/:id(.:format) movies#destroy
root / :controller#:action
现在我一直在关注的视频他们得到了
movies GET /movies(.:format) {:action=>"index", :controller=>"movies"}
POST /movies(.:format) {:action=>"create", :controller=>"movies"}
new_movie GET /movies/new(.:format) {:action=>"new", :controller=>"movies"}
edit_movie GET /movies/:id/edit(.:format) {:action=>"edit", :controller=>"movies"}
movie GET /movies/:id(.:format) {:action=>"show", :controller=>"movies"}
PUT /movies/:id(.:format) {:action=>"update", :controller=>"movies"}
DELETE /movies/:id(.:format) {:action=>"destroy", :controller=>"movies"}
root / {:to=>#<Proc:0x8c93620@/usr/local/lib/ruby/gem k-3.1.10/lib/action_dispatch/routing/redirection.rb:87 {labda}>)
我如何让它像那样显示动作控制器,与它的存在方式相比,它很容易阅读