나는이 :단일 경로 리소스의 경로를 변경하는 방법은 무엇입니까? 내 경로에
는resources :accounts
이 생성됩니다
new_account GET /accounts/new(.:format) accounts#new
new_account GET /register(.:format) accounts#new
에 :
accounts GET /accounts(.:format) accounts#index
POST /accounts(.:format) accounts#create
new_account GET /accounts/new(.:format) accounts#new
edit_account GET /accounts/:id/edit(.:format) accounts#edit
account GET /accounts/:id(.:format) accounts#show
PUT /accounts/:id(.:format) accounts#update
DELETE /accounts/:id(.:format) accounts#destroy
내가에만 다음 자원 경로를 변경하려면
이것이 가능합니까?
당신이 레일에서의 라우팅에 대한 자세한 내용을 알고 싶다면
routes.rb
, 나는이 recommned 당신이 라인을 시도하여 routes.rb에 줄을 추가 : //guides.rubyonrails.org/routing.html –이 방법으로 도우미라는 new_account를 잃어 버렸습니다. 그것을 되돌릴 수있는 방법이 있습니까? – Nathan
사실, 신경 쓰지 마라. 이제 나에게 '등록'헬퍼가 생겼다. 그게 좋네요 :-) – Nathan