I have two partials to deal with contact information. The Contact information uses single-table polymorphism. I want to be able to use save on Contact and set 'type' manually, based on the type of form the user is filling in. This is saved as the value on a hidden field.
class Contact belongs_to :person acts_as_list :scope => :person validates_presence_of :type validates_inclusion_of :type, :in => TYPES.map {|disp, val| val} validates_presence_of :label end
class PhoneNumber < Contact