Sha256: a38f869d796ee312ae4126ca3f506a00c14eca8fa9f40963fdb6284be832fe7a

Contents?: true

Size: 1.05 KB

Versions: 21

Compression:

Stored size: 1.05 KB

Contents

<%
  models = ApplicationRecord.descendants
%>
<div>
  <h3>Resources</h3>

  <div>The primary goal of Avo is to administer your database records. To do that Avo, uses the concept of a <strong>Resource</strong>. Each Avo <strong>Resource</strong> corresponds to a <strong>Rails Model</strong>.</div>

  <% if models.present? %>
    <div class="mt-2" data-controller="hidden-input">
      It seems you already have <%= models.count %> <%= 'model'.pluralize models.count %> in your app. You can generate resources for each one with the following commands.

      <strong class="cursor-pointer block mt-2" data-action="click->hidden-input#showContent">Generate resources 👇</strong>

      <div class="mt-2 hidden" data-hidden-input-target="content">
        <% models.each do |model| %>
          <code class="text-lg"><%= model.to_s %></code>
          <div>
            <code class="p-1 rounded bg-light-blue-500 text-white">bin/rails generate avo:resource <%= model.to_s %></code>
          </div>
        <% end %>
      </div>
    </div>
  <% else %>

  <% end %>
</div>

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
avo-1.2.3 app/views/avo/home/_resources.html.erb
avo-1.3.0.pre.1 app/views/avo/home/_resources.html.erb
avo-1.2.2 app/views/avo/home/_resources.html.erb
avo-1.1.0 app/views/avo/home/_resources.html.erb
avo-1.1.0.pre.1 app/views/avo/home/_resources.html.erb
avo-1.0.5 app/views/avo/home/_resources.html.erb
avo-1.0.4 app/views/avo/home/_resources.html.erb
avo-1.0.2 app/views/avo/home/_resources.html.erb
avo-1.0.1 app/views/avo/home/_resources.html.erb
avo-1.0.0 app/views/avo/home/_resources.html.erb
avo-0.5.0.beta15 app/views/avo/home/_resources.html.erb
avo-0.5.0.beta14 app/views/avo/home/_resources.html.erb
avo-0.5.0.beta13 app/views/avo/home/_resources.html.erb
avo-0.5.0.beta12 app/views/avo/home/_resources.html.erb
avo-0.5.0.beta11 app/views/avo/home/_resources.html.erb
avo-0.5.0.beta10 app/views/avo/home/_resources.html.erb
avo-0.5.0.beta9 app/views/avo/home/_resources.html.erb
avo-0.5.0.beta8 app/views/avo/home/_resources.html.erb
avo-0.5.0.beta7 app/views/avo/home/_resources.html.erb
avo-0.5.0.beta6 app/views/avo/home/_resources.html.erb