Sha256: 448a589fdd903bb31e2d86544e46795444f6ea6e749a05b27404474f4a018908

Contents?: true

Size: 1.81 KB

Versions: 12

Compression:

Stored size: 1.81 KB

Contents

<%
  @is_model_controller = controller.class.included_modules.include?(RESTFramework::ModelControllerMixin)
%>
<div class="row">
  <div>
    <ul class="nav nav-tabs">
      <li class="nav-item">
        <a class="nav-link active" href="#tab-routes" data-bs-toggle="tab" role="tab">
          Routes
        </a>
      </li>
      <% @_rrf_form_routes_raw = @route_groups.values[0].select { |r|
        r[:matches_params] && (
          r[:verb].in?(["POST", "PUT", "PATCH"]) ||
          (r[:verb] == "DELETE" && r[:action] == "destroy_all")
        )
      } %>
      <% @_rrf_form_routes_html = @route_groups.values[0].select { |r|
        r[:matches_params] && r[:verb].in?(["POST", "PUT", "PATCH"])
      } %>
      <% if @_rrf_form_routes_raw.present? %>
        <li class="nav-item">
          <a class="nav-link" href="#tabRawForm" data-bs-toggle="tab" role="tab">
            Raw Form
          </a>
        </li>
      <% end %>
      <% if @_rrf_form_routes_html.present? && @is_model_controller %>
        <li class="nav-item">
          <a class="nav-link" href="#tabHtmlForm" data-bs-toggle="tab" role="tab">
            HTML Form
          </a>
        </li>
      <% end %>
    </ul>
  </div>
  <div class="tab-content">
    <div class="tab-pane fade show active" id="tab-routes" role="tabpanel">
      <%= render partial: "rest_framework/routes_and_forms/routes" %>
    </div>
    <% if @_rrf_form_routes_raw.present? %>
      <div class="tab-pane fade" id="tabRawForm" role="tabpanel">
        <%= render partial: "rest_framework/routes_and_forms/raw_form" %>
      </div>
    <% end %>
    <% if @_rrf_form_routes_html.present? && @is_model_controller %>
      <div class="tab-pane fade" id="tabHtmlForm" role="tabpanel">
        <%= render partial: "rest_framework/routes_and_forms/html_form" %>
      </div>
    <% end %>
  </div>
</div>

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rest_framework-1.0.0.beta2 app/views/rest_framework/_routes_and_forms.html.erb
rest_framework-1.0.0.beta1 app/views/rest_framework/_routes_and_forms.html.erb
rest_framework-0.11.0 app/views/rest_framework/_routes_and_forms.html.erb
rest_framework-0.10.0 app/views/rest_framework/_routes_and_forms.html.erb
rest_framework-0.9.16 app/views/rest_framework/_routes_and_forms.html.erb
rest_framework-0.9.15 app/views/rest_framework/_routes_and_forms.html.erb
rest_framework-0.9.14 app/views/rest_framework/_routes_and_forms.html.erb
rest_framework-0.9.12.pre.1.pre.g39306cb app/views/rest_framework/_routes_and_forms.html.erb
rest_framework-0.9.11.pre.40.pre.g5dcad32 app/views/rest_framework/_routes_and_forms.html.erb
rest_framework-0.9.11 app/views/rest_framework/_routes_and_forms.html.erb
rest_framework-0.9.10 app/views/rest_framework/_routes_and_forms.html.erb
rest_framework-0.9.9 app/views/rest_framework/_routes_and_forms.html.erb