hyperstack-org / hyperstack-org/hyperstack

trying to destroy an item that is not included in the default scope fails

Aberta
#260 1 comentário 0 reações 0 responsáveis Ver no GitHub
good first issue
Linguagem predominante
JavaScript
Estrelas
538
Forks
41
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

If you have a default_scope (other than just `all`) then some records are not included by a simple query. However you can get you can override the default scope using `unscoped`. This means you can get the id of records that are not in the default scope.

If you try to destroy one of those records, it doesn't work.

Fix would be on about line 590 of `isomorphic_base.rb` in the server side `destroy_record` method. Just change `model.find(id)` to `model.unscoped.find(id)`

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.