I have a Client and ProposalRequest model that looks like this:
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
In my routes file, I included nested routes, as usual.
resources :clients do
resources :proposal_requests
end
And this is my form:
-semantic_form_for [Client.new, ProposalRequest.new] do |f|
=f.inputs
=f.buttons
But after that I got stuck due to this error.
No route matches {:controller=>"proposal_requests", :client_id=>
Can someone help me deal with this error?
source
share