<%= form_for [@project, @api] do |f| %> <% if @api.errors.any? %>

<%= pluralize(@api.errors.count, "error") %> prohibited this api from being saved:

<% end %>
<%= f.label :name %>
<%= f.text_field :name, :required => "true" %>
<%= f.label :url %>
<%= f.text_field :url, :required => "true" %>
<%= f.label :version %>
<%= f.text_field :version, :required => "true" %>
<%= f.label :request_type %>
<%= f.text_field :request_type, :required => "true" %>
<%= f.label :api_group %>
<%= f.text_field :api_group, :required => "true" %>

Parameters

<%= f.fields_for :parameters do |ff| %> <%= render "parameter_fields", :f => ff %> <% end %>

Success Response

<%= f.fields_for :success_responses do |ff| %> <%= render "success_response_fields", :f => ff %> <% end %>

Failure Response

<%= f.fields_for :failure_responses do |ff| %> <%= render "failure_response_fields", :f => ff %> <% end %>
<%= f.submit "Create API", :class => "btn create_api_btn" %>
<% end %>