我有这些路线rake routes
:
workstations POST /workstations(.:format) workstations#create
new_workstations GET /workstations/new(.:format) workstations#new
edit_workstations GET /workstations/edit(.:format) workstations#edit
GET /workstations(.:format) workstations#show
PUT /workstations(.:format) workstations#update
DELETE /workstations(.:format) workstations#destroy
POST / workstations#delete_history_and_queue
我认为这link_to
是:
= link_to "Update", controller: "workstations", method: "put"
然而我收到了这个错误:
No route matches {:controller=>"workstations", :method=>"put"}
我是否没有指定链接使用workstations
带有该方法的控制器put
,理论上应该导致该workstations#update
操作?