search for: zip_addon_id

Displaying 1 result from an estimated 1 matches for "zip_addon_id".

2009 Sep 21
0
Polymorphic form
...gt; TYPES.map {|disp, val| val} validates_presence_of :label end class PhoneNumber < Contact # # ... # validates_as_phone_number :value validates_presence_of :value validates_uniqueness_of :value, :scope => [:person_id, :type] end class Address < Contact validates_presence_of :zip_addon_id validates_uniqueness_of :value, :scope => [:person_id, :type] belongs_to :zip_addon end Here''s one of the partials: <div class="phone_number"> <% fields_for "person[contacts][]", phone_number do |contact_form| - %> <p> Phone Number&...