<h1>New child</h1>

<% form_tag '/children', :multipart => true do %>

    <% schema = Schema.get_schema %>
    <% Schema.get_schema[:fields].each do |field| %>
        <p>
          <%= render :partial => field[:type], :object => field %>
        </p>
    <% end %>

    <p>
      <%= label_tag "child[photo]", "Photo" %><br/>
      <%= file_field_tag "child[photo]" %>
    </p>

    <p>
      <%= submit_tag "Create" %>
    </p>

<% end %>

<%= link_to 'Back', children_path %>
<h1>New child</h1>

<% form_tag '/children', :multipart => true do %>

    <%= error_messages_for :child %>

    <% Schema.get_schema[:fields].each do |field| %>
        <p>
          <%= render :partial => field[:type], :object => field %>
        </p>
    <% end %>

    <p>
      <%= label_tag "child[photo]", "Photo" %><br/>
      <%= file_field_tag "child[photo]" %>
    </p>

    <p>
      <%= submit_tag "Create" %>
    </p>

<% end %>

<%= link_to 'Back', children_path %>
Add error message handling to new Child form.
Add error message handling to new Child form.