How do I change the `default_actions/1` for all schemas at once?
- Langage dominant
- Elixir
- Étoiles
- 1.4k
- Forks
- 171
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
The `default_actions` for all schemas is [:new, :edit, :delete]. Is there a way to control `default_actions` for all schemas without implementing each `default_actions/1` function?
For example, I want to prevent all schemas from being added, modified, or deleted. Then I'll have to create an admin module (ex. `MyApp.Products.ProductAdmin`) for all schemas and override the `default_actions/1` function as shown below. Is it possible to set this as a whole in one implementation rather than one?
```elixir
defmodule MyApp.Products.ProductAdmin do
def default_actions(_schema) do
[]
end
end
defmodule MyApp.Products.BlogAdmin do
def default_actions(_schema) do
[]
end
end
...
```
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.