%= form_for [@project, @api] do |f| %>
<% if @api.errors.any? %>
<%= pluralize(@api.errors.count, "error") %> prohibited this api from being saved:
<% @api.errors.full_messages.each do |msg| %>
- <%= msg %>
<% end %>
<% end %>
Parameters
<%= f.fields_for :parameters do |ff| %>
<%= render "parameter_fields", :f => ff %>
<% end %>
<%= link_to_add_fields "Add More Parameters", f, :parameters %>
Success Response
<%= f.fields_for :success_responses do |ff| %>
<%= render "success_response_fields", :f => ff %>
<% end %>
<%= link_to_add_success_fields "Add More Success Response", f, :success_responses %>
Failure Response
<%= f.fields_for :failure_responses do |ff| %>
<%= render "failure_response_fields", :f => ff %>
<% end %>
<%= link_to_add_failure_fields "Add More Failure Response", f, :failure_responses %>
<%= f.submit "Create API", :class => "btn create_api_btn" %>
<% end %>