hyperstack-org / hyperstack-org/hyperstack

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

Open
#260 1 comment 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
JavaScript
Stars
538
Forks
41
PR merge metrics
No merged PRs in 30d

Description

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)`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.