> You have both a regular route and a nested route for your users.  Make
> sure your form is submitting to the nested route.
> It should look something like (depending on your variable names):
>
> form_for [@company, @user] do |f|
>
> Without the company your form will post to /users and the company id
> will not be passed.

I only want to create a new User not a new Company. The Company is 
pre-existent. A lot of tutorials I found don't explain how to do that, 
they explain how to create the Parent and Child at the same time. I 
ALREADY have the Parent, I just want to create a Child for it, and have 
the id of the parent written into the Child table, like parent_id.

How would I make the results get written into a user record? Yesterday 
when I was trying to work on it, I read something about a "build" 
method. Is that what you recommend I use?

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to