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-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/ae5620b7-a237-4ba2-ac52-1596fa3b7d8a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to