> On Dec 29, 2015, at 8:36 AM, fugee ohu <[email protected]> wrote:
> 
> user has many addresses so i wanna put address fields in the new user 
> registration form, i don't know how i would do it, i'm trying to 
> conceptualize it
> 

Have a look at accepts_nested_attributes_for and the fields_for form helper. 
This is a really well-solved problem in Rails. If you use simple_form, there 
are helpers in there for this pattern as well. And as usual, Ryan Bates wrote 
about this (and made a great gem for it) about a million internet-years ago: 
https://github.com/ryanb/nested_form and 
http://railscasts.com/episodes/196-nested-model-form-revised

Walter

> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/rubyonrails-talk/5898a890-523e-48b2-bf2e-0d12d992c18c%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/176C439F-A99E-40BA-8031-E97EC970DD66%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to