<% if @inputs.is_a?(Hash) && @inputs.has_key?(:undefined) %> <%= render 'undefined_route', :route => @inputs[:undefined] %> <% else %> <% @inputs.each do |input| %> <%= form_tag @route[:path], :method => @route[:verb], :class => 'well form-horizontal', :remote => true do %> <% if input[:url_params].empty? && input[:post_params].empty? %>
No params specified.
<% else %> <% end %> <% if input[:url_params].present? %>
<% input[:url_params].each do |label, value| %> <%= render 'param_form_element', :label => "[api_taster_url_params]#{label}", :value => value, :label_text => label %> <% end %>
<% end %> <% if input[:post_params].present? %>
<%= ApiTaster::FormBuilder.new(input[:post_params]).html.html_safe %>
<% end %>
<% end %> <% end %> <% end %>