Skip to content

Instantly share code, notes, and snippets.

@bradly
Created August 21, 2008 16:54
Show Gist options
  • Save bradly/6591 to your computer and use it in GitHub Desktop.
Save bradly/6591 to your computer and use it in GitHub Desktop.
- fields_for "profile[contact_attributes][]", contact do |c|
%label{:for => 'contact_first_name'} First Name
= c.text_field :first_name, :size => 25
%br
%label{:for => 'contact_last_name'} Last Name
= c.text_field :last_name, :size => 25
%br
%label{:for => 'contact_email'} Email Address
= c.text_field :email, :size => 25
%br
%label{:for => 'contact_home_phone'} Home Phone
= text_field_tag :contact_home_phone, nil, :size => 25
%br
%label{:for => 'contact_mobile_phone'} Mobile Phone
= text_field_tag :contact_mobile_phone, nil, :size => 25
%br
%label{:for => 'contact_relationship'} Relationship
= select :contact, :relationship, ['Spouse', 'Mother', 'Father', 'Son', 'Daughter', 'Family', 'Friend', 'Doctor', 'Caregiver', 'Other'], { :include_blank => true }
- end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment