Skip to content

Commit 00cb89c

Browse files
authored
chore: update get started page & removed ApplicationRecord dependency (#331)
1 parent 8f4dddf commit 00cb89c

File tree

5 files changed

+26
-13
lines changed

5 files changed

+26
-13
lines changed

app/views/avo/home/_actions.html.erb

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<div>
22
<h3>Actions</h3>
33

4-
<div class="mt-2" data-controller="hidden-input">
4+
<div class="mt-2">
55
Avo actions allow you to perform specific tasks on one or more of your records. For example, you might want to mark a user as inactive and optionally send a message that may be customized by the person that wants to run the action.
66

7-
<strong class="cursor-pointer block mt-2" data-action="click->hidden-input#showContent">Generate action 👇</strong>
8-
9-
<div class="mt-2 hidden" data-hidden-input-target="content">
7+
<div class="mt-2">
108
<code class="text-lg">Toggle published</code>
11-
<div>
9+
<div class="mt-1">
1210
<code class="p-1 rounded bg-light-blue-500 text-white">bin/rails generate avo:action toggle_published</code>
1311
</div>
1412
</div>
13+
14+
<a href="https://docs.avohq.io/1.0/actions.html" target="_blank" title="Avo Actions documentation" class="text-bold cursor-pointer block mt-2">Actions in the docs 👉</a>
1515
</div>
1616
</div>

app/views/avo/home/_docs.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
<div class="mt-2">
55
We take pride in our documentation. Please check it out to see what you can build with Avo
66

7-
<a href="https://docs.avohq.io" class="text-bold cursor-pointer block mt-2">Check out the docs 👉</a>
7+
<a href="https://docs.avohq.io" target="_blank" title="Avo documentation" class="text-bold cursor-pointer block mt-2">Check out the docs 👉</a>
88
</div>
99
</div>

app/views/avo/home/_filters.html.erb

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
<div class="mt-2" data-controller="hidden-input">
55
Filters allow you to better scope the index queries for records you are looking for.
66

7-
<strong class="cursor-pointer block mt-2" data-action="click->hidden-input#showContent">Generate filter 👇</strong>
8-
9-
<div class="mt-2 hidden" data-hidden-input-target="content">
7+
<div class="mt-2">
108
<code class="text-lg">Published filter</code>
11-
<div>
9+
<div class="mt-1">
1210
<code class="p-1 rounded bg-light-blue-500 text-white">bin/rails generate avo:filter published_filter</code>
1311
</div>
1412
</div>
13+
14+
<a href="https://docs.avohq.io/1.0/filters.html" target="_blank" title="Avo Filters documentation" class="text-bold cursor-pointer block mt-2">Filters in the docs 👉</a>
1515
</div>
1616
</div>

app/views/avo/home/_resources.html.erb

+15-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<%
2-
models = ApplicationRecord.descendants
2+
models = begin
3+
ApplicationRecord.descendants
4+
rescue => exception
5+
[]
6+
end
37
%>
48
<div>
59
<h3>Resources</h3>
@@ -10,7 +14,7 @@
1014
<div class="mt-2" data-controller="hidden-input">
1115
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.
1216

13-
<strong class="cursor-pointer block mt-2" data-action="click->hidden-input#showContent">Generate resources 👇</strong>
17+
<strong class="cursor-pointer block mt-2" data-action="click->hidden-input#showContent">Generate resources 👇 (click to reveal)</strong>
1418

1519
<div class="mt-2 hidden" data-hidden-input-target="content">
1620
<% models.each do |model| %>
@@ -22,7 +26,16 @@
2226
</div>
2327
</div>
2428
<% else %>
29+
<div class="mt-2" data-controller="hidden-input">
30+
You may generate a resource using the following command:
31+
<br>
2532

33+
<code class="p-1 rounded bg-light-blue-500 text-white">bin/rails generate avo:resource post</code>
34+
</div>
2635
<% end %>
36+
37+
<p>
38+
<a href="https://docs.avohq.io/1.0/resources.html" target="_blank" title="Avo Resources documentation">Docs</a>
39+
</p>
2740
</div>
2841

app/views/avo/home/index.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<li><span class="mr-2">👍</span> Grid view</li>
2828
<li><span class="mr-2">👍</span> Authorization</li>
2929
<li><span class="mr-2">👍</span> Localization</li>
30-
<li><span class="mr-2"></span> Custom tools</li>
30+
<li><span class="mr-2">👍</span> Custom tools</li>
3131
<li><span class="mr-2"></span> Custom fields</li>
3232
<li><span class="mr-2"></span> Search</li>
3333
<li><span class="mr-2">🕐</span> Dashboards</li>

0 commit comments

Comments
 (0)