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

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
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.

Search Discussions

  • Walter Lee Davis at Dec 29, 2015 at 1:47 pm

    On Dec 29, 2015, at 8:36 AM, fugee ohu 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 rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    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 rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    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.
  • Fugee ohu at Dec 30, 2015 at 12:27 am
    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 <fuge...@gmail.com <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 rubyonrails-ta...@googlegroups.com <javascript:>.
    To post to this group, send email to rubyonra...@googlegroups.com
    <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 rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    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.
  • Walter Lee Davis at Dec 30, 2015 at 1:51 am

    On Dec 29, 2015, at 7:27 PM, fugee ohu wrote:

    Can you tell me how to display an attribute from the parent in a view please
    Show your work! What have you tried already?

    Walter
    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 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 rubyonrails-ta...@googlegroups.com.
    To post to this group, send email to rubyonra...@googlegroups.com.
    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 rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    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.
    --
    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 rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/3E3655BF-E34D-47E4-9AE0-11AC1BCD59B1%40wdstudio.com.
    For more options, visit https://groups.google.com/d/optout.
  • Fugee ohu at Dec 30, 2015 at 2:51 am
    thanks, i found it here
    http://guides.rubyonrails.org/association_basics.html i just did
    @child.parent.attribute that works ~ thanks again
    On Tuesday, December 29, 2015 at 8:51:53 PM UTC-5, Walter Lee Davis wrote:

    On Dec 29, 2015, at 7:27 PM, fugee ohu <fuge...@gmail.com <javascript:>> wrote:
    Can you tell me how to display an attribute from the parent in a view
    please

    Show your work! What have you tried already?

    Walter
    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 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 rubyonrails-ta...@googlegroups.com.
    To post to this group, send email to rubyonra...@googlegroups.com.
    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 rubyonrails-ta...@googlegroups.com <javascript:>.
    To post to this group, send email to rubyonra...@googlegroups.com
    <javascript:>.
    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.
    --
    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 rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f05058d9-4fb6-4837-881a-e8ac0a5d543e%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedDec 29, '15 at 1:36p
activeDec 30, '15 at 2:51a
posts5
users2
websiterubyonrails.org
irc#RubyOnRails

2 users in discussion

Fugee ohu: 3 posts Walter Lee Davis: 2 posts

People

Translate

site design / logo © 2021 Grokbase