Thank you so much! Very helpful. I have to get over my old-school practices. Liz
On Thursday, May 21, 2015 at 6:00:45 PM UTC-4, Walter Lee Davis wrote: > > Do these addresses have any difference besides being primary or secondary? > Are there extra fields in one that are not in the other? Or is primary > maybe a boolean on the address object? > > Walter > > On May 21, 2015, at 3:36 PM, Elizabeth McGurty <emcg...@gmail.com > <javascript:>> wrote: > > > I have a parent table. And associated with that parent table is two > possible addresses, a primary one and/or an alternative: (has_many and > accepts_nested_attributes_for). > > > > Rather than creating a second addresses table, I have used a flag, > address_type to distinguish primary from alternative, which will apparently > only be useful if I can create a condition on fields_for > > > > But now as I explore and research more, seems that I cannot create a > condition on fields_for addresses, type => 'alternative' or 'primary'. > > > > I want to utilize Rails associations... Should I just create tables: > primary_addresses and alternative_addresses? > > > > Thanks, > > > > Liz > > > > -- > > 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/ae5620b7-a237-4ba2-ac52-1596fa3b7d8a%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+unsubscr...@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/c5235a3c-faf1-41f6-aa74-a133ef91e926%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.