次のようなClientモデルとProposalRequestモデルがあります。
class Client < ActiveRecord::Base
has_many :proposal_requests
accepts_nested_attributes_for :proposal_requests, :allow_destroy => true
end
class ProposalRequest < ActiveRecord::Base
belongs_to :client
end
ルートファイルには、いつものようにネストされたルートを含めました。
resources :clients do
resources :proposal_requests
end
そして、これはこれまでの私のフォームです:
-semantic_form_for [Client.new, ProposalRequest.new] do |f|
=f.inputs
=f.buttons
しかし、この後、私はこのエラーのために立ち往生しています。
No route matches {:controller=>"proposal_requests", :client_id=>#<Client id: nil, name: nil, title: nil, organization: nil, street_address: nil, city: nil, state: nil, zip: nil, phone: nil, email: nil, status: "interested", how_you_heard: nil, created_at: nil, updated_at: nil>}
誰かが私がこのエラーをパズルで解くのを手伝ってもらえますか?