私は、次のルートが宣言しているが: Railsのネストされたリソース - 設定のparam:問題
resources :accounts, param: :account_id do
resources :instructions, param: :instruction_id do
resources :messages, param: :message_id
end
end
だからアカウントは、命令は、メッセージは私が持っている3つのモデルです。私には間違って見える
account_instruction_messages GET /accounts/:account_account_id/instructions/:instruction_instruction_id/messages(.:format) messages#index
POST /accounts/:account_account_id/instructions/:instruction_instruction_id/messages(.:format) messages#create
new_account_instruction_message GET /accounts/:account_account_id/instructions/:instruction_instruction_id/messages/new(.:format) messages#new
edit_account_instruction_message GET /accounts/:account_account_id/instructions/:instruction_instruction_id/messages/:message_id/edit(.:format) messages#edit
account_instruction_message GET /accounts/:account_account_id/instructions/:instruction_instruction_id/messages/:message_id(.:format) messages#show
PATCH /accounts/:account_account_id/instructions/:instruction_instruction_id/messages/:message_id(.:format) messages#update
PUT /accounts/:account_account_id/instructions/:instruction_instruction_id/messages/:message_id(.:format) messages#update
DELETE /accounts/:account_account_id/instructions/:instruction_instruction_id/messages/:message_id(.:format) messages#destroy
account_instructions GET /accounts/:account_account_id/instructions(.:format) instructions#index
POST /accounts/:account_account_id/instructions(.:format) instructions#create
new_account_instruction GET /accounts/:account_account_id/instructions/new(.:format) instructions#new
edit_account_instruction GET /accounts/:account_account_id/instructions/:instruction_id/edit(.:format) instructions#edit
account_instruction GET /accounts/:account_account_id/instructions/:instruction_id(.:format) instructions#show
PATCH /accounts/:account_account_id/instructions/:instruction_id(.:format) instructions#update
PUT /accounts/:account_account_id/instructions/:instruction_id(.:format) instructions#update
DELETE /accounts/:account_account_id/instructions/:instruction_id(.:format) instructions#destroy
が、私は
を期待していた/アカウント/::これは私のルートを与えるACCOUNT_ID /説明書/:instruction_id等...?
私が間違っていることをアドバイスできますか?
あなたはこれで問題がある –