Accept nested attributes in order to allow for some easy form to enter emails and phone numbers.

This commit is contained in:
gchq 2011-05-20 22:25:19 +02:00
parent 1dea3de537
commit 6213fa6312

View file

@ -1,4 +1,7 @@
class Contact < ActiveRecord::Base
has_many :emails
has_many :phones
accepts_nested_attributes_for :emails, :allow_destroy => true
accepts_nested_attributes_for :phones, :allow_destroy => true
end