Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3481098
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:24:51+00:00 2026-05-18T10:24:51+00:00

I have a Client and ProposalRequest model that look like this: class Client <

  • 0

I have a Client and ProposalRequest model that look 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 my routes file, I included the nested routes, as usual.

resources :clients do
  resources :proposal_requests
end

And this is my form so far:

-semantic_form_for [Client.new, ProposalRequest.new] do |f|
   =f.inputs
   =f.buttons

But after this, I’m stuck because of this error.

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>}

Can anyone help me puzzle out this error?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T10:24:52+00:00Added an answer on May 18, 2026 at 10:24 am

    The problem is that your nested route is meant to add a new ProposalRequest to an existing Client. If you want to create a Client and a ProposalRequest at the same time, you need to just use new_client_path and semantic_form_for @client do |f|.

    I would recommend you do the following in your clients_controller:

    def new
      @client = Client.find(params[:id])
      @client.proposal_requests.build
    end
    

    And in your view:

    semantic_form_for @client do |f|      
      = f.inputs # fields for client
      = f.inputs :name => 'Proposal Request', :for => :proposal_requests do |pf|
        = pf.input :some_proposal_request_attribute
      = f.buttons
    

    Hope this helps. Make sure to look at all the examples at https://github.com/justinfrench/formtastic and do some trial and error to get your form how you want it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Usually I have client code similiar to something like this: // SomeOtherServiceClient would be
I have a client that wants a WYSIWYG form that behaves like MS word.
I have a client-server program. I'm sending data like this: private void Sender(string s,TcpClient
I have client application that uses WCF service to insert some data to backend
We have a client that has Oracle Standard , and a project that would
I have a client that is asking me to give them a listing of
I have a client/server application that communicates with .Net remoting. I need my clients
I have client side date validation that requires one particular Date to be one
We have client app that is running some SQL on a SQL Server 2005
I have Client class and Server class but when i run both main methods

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.