Sha256: f1481a6dffd3ec14382b2ea33280156a7e37f81c5790619c6f49a0a68f5c187a

Contents?: true

Size: 1.35 KB

Versions: 15

Compression:

Stored size: 1.35 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 %>
          <%- param[:validations].each do |item| %>
            <li><%= item.html_safe %></li>
          <%- 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

15 entries across 15 versions & 1 rubygems

Version Path
apipie-rails-0.5.11 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.5.10 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.5.9 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.5.8 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.5.7 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.5.6 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.5.5 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.5.4 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.5.3 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.5.2 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.5.1 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.5.0 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.4.0 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.3.7 app/views/apipie/apipies/_params.html.erb
apipie-rails-0.3.6 app/views/apipie/apipies/_params.html.erb