Skip to content

Commit

Permalink
Feature/confirmation message before save (#244)
Browse files Browse the repository at this point in the history
* adding resource option

* on to when

* Update docs/3.0/resources.md

---------

Co-authored-by: Paul Bob <[email protected]>
  • Loading branch information
G-Simpson and Paul-Bob authored Jul 29, 2024
1 parent ee81a1e commit 8c5b061
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/3.0/resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,23 @@ We know, the array notation looks weird, but it works.

</Option>

<Option name="`self.confirm_on_save`">

<VersionReq version="3.10.10" />
If you would like to ask for confirmation when saving a resource you can do so by setting `confirm_on_save` to `true`.

That will help add friction to the saving process, avoiding human error.

```ruby
class Avo::Resources::Post < Avo::BaseResource
self.confirm_on_save = true
end
```

This option defaults to false

</Option>

<Option name="`default_view_type`">

On <Index />, the most common view type is `:table`, but you might have some data that you want to display in a `:grid` or `:map`. You can change that by setting `default_view_type` to `:grid` and by adding the `grid` block.
Expand Down

0 comments on commit 8c5b061

Please sign in to comment.