- if api_details['method'].present? && %{post get}.include?(api_details['method'].downcase) %hr/ %p %strong Try it out: - full_url = "#{ApiDocs.config.api_url}#{api_details['url']}" %em #{api_details['method']} #{full_url} = bootstrap_form_for '', :url => full_url, :html => {:method => api_details['method'], :target => '_blank', :class => 'form-horizontal', 'data-url' => full_url} do |f| - case params - when Array - api_details['params'].each do |param| = f.text_field param, :label => param, :name => param - when Hash - api_details['params'].each do |param, description| = f.text_field param, :label => param, :name => param, :help_block => description .form-actions = f.submit :send, :class => 'btn-primary'