hyperstack-org / hyperstack-org/hyperstack
Incorrect documentation about server operations
Aberta
- Linguagem predominante
- JavaScript
- Estrelas
- 538
- Forks
- 41
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
On this page: https://docs.hyperstack.org/dsl-isomorphic/hyper-operation#server-operations
there is this example code snippet:
```
validate { raise Hyperstack::AccessViolation unless params.acting_user.admin? }
```
That doesn't seem to work properly. One working alternative is:
```
validate { params.acting_user.admin? }
```
Another alternative:
```
validate { params.acting_user.admin? || raise Hyperstack::AccessViolation }
```
Guia de contribuição
Avaliação
Esta issue ainda não foi avaliada.