Skip to content

Instantly share code, notes, and snippets.

@jacobsimeon
Last active December 21, 2015 20:09
Show Gist options
  • Save jacobsimeon/6359439 to your computer and use it in GitHub Desktop.
Save jacobsimeon/6359439 to your computer and use it in GitHub Desktop.
<%= simple_form_for(
@child,
url: case_children_path(@case)
) do |f| %>
<section>
<header>
<h2>New child</h2>
</header>
<%= f.input :first_name %>
<%= f.input :last_name %>
<%= f.input :gender, as: :select, collection: %w(Male Female) %>
<%= f.input :born_on, as: :string, label: "Date of birth" %>
<%= f.input :ssn, label: "SSN" %>
<div class="actions">
<%= f.submit "Create child", class: :button %>
</div>
</section>
<% end %>
<%= simple_form_for(
@child,
url: case_children_path(@case)
) do |f| %>
<section>
<header>
<h2>New child</h2>
</header>
<%= f.input :first_name, placeholder: "First Name" %>
<%= f.input :last_name %>
<%= f.input :gender, as: :select, collection: %w(Male Female) %>
<%= f.input :born_on, as: :string, label: "Date of birth" %>
<%= f.input :ssn, label: "SSN" %>
<div class="actions">
<%= f.submit "Create child", class: :button %>
</div>
</section>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment