Sha256: f0424de78bf05c9642885f45da0b561f391cd5402c86d53bf8ebc2c2ce4cb977

Contents?: true

Size: 1.42 KB

Versions: 20

Compression:

Stored size: 1.42 KB

Contents

<% level ||= 0 %>
<% col = 255 - level * 5 %>
<% params.each do |param| %>
  <% if !param[:show] %>
    <%= render(:partial => "params", :locals => {:level => level, :params => param[:params]}) unless param[:params].blank? %>
    <% next %>
  <% end %>
  <tr style='background-color:rgb(<%= "#{col},#{col},#{col}" %>);'>
    <td>
      <strong><%= param[:full_name] %> </strong><br>
      <small>
        <%= param[:required] ? t('apipie.required') : t('apipie.optional') %>
        <%= param[:allow_nil] ? ', '+t('apipie.nil_allowed') : '' %>
      </small>
    </td>
    <td>
      <%= param[:description].html_safe %>
      <%- if param[:validations].present? || param[:validator].present? %>
        <p><strong>Validations:</strong></p>
        <ul>
          <%- if param[:validator].present? %>
            <li><%= Apipie.markup_to_html(param[:validator]).html_safe %></li>
          <%- end %>
          <%- if param[:validations].present? %>
            <%- param[:validations].each do |item| %>
              <li><%= item.html_safe %></li>
            <%- end %>
          <%- end %>
        </ul>
      <%- end %>

      <% unless param[:metadata].blank? %>
        <br>
        Metadata:
        <%= render(:partial => "metadata", :locals => {:meta => param[:metadata]}) %>
      <% end %>
    </td>

  </tr>

  <%= render(:partial => "params", :locals => {:level => level + 1, :params => param[:params]}) unless param[:params].blank? %>
<% end %>

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
apipie-rails-0.9.2 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.9.1 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.9.0 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.8.2 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.8.1 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.8.0 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.7.2 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.7.1 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.7.0 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.6.0 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.5.20 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.5.19 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.5.18 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.5.17 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.5.16 app/views/apipie/apipies/_params.html.erb
apipierails3-0.0.1 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.5.15 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.5.14 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.5.13 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.5.12 app/views/apipie/apipies/_params.html.erb