Can you tell me how to display an attribute from the parent in a view please
On Tuesday, December 29, 2015 at 8:47:59 AM UTC-5, Walter Lee Davis wrote: > > > > On Dec 29, 2015, at 8:36 AM, fugee ohu <[email protected] <javascript:>> > 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] <javascript:>. > > To post to this group, send email to [email protected] > <javascript:>. > > 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/bd965c24-fcdd-401b-9b93-859532f97851%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

