Accept nested attributes in order to allow for some easy form to enter emails and phone numbers.
This commit is contained in:
parent
1dea3de537
commit
6213fa6312
1 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue