Skip to content

Act as paranoid & default scopes #192

@Josyann

Description

@Josyann

Hi, thanks a lot for the gem.
I would like to use it but I have encountered some issues:

Act as paranoid

We are using the act_as_paranoid gem
We have deleted_at column on some of our models
Using the gem, I cannot delete any record using act_as_paranoid. There is no errors, the feedback says "Selected item has been removed" and that's it. The record is still there, not deleted and the deleted_at still nil.
If I'm removing the act_as_paranoid gem, it works as intended.

How to make it work properly with act_as_paranoid?

Default scope

Again, because of act_as_paranoid we have some default scope on our models using this gem.
When changing the query to SELECT "regions".* FROM "regions" from SELECT "regions".* FROM "regions" WHERE "regions"."deleted_at" IS NULL the query returns only regions where deleted_at is nil.
Is there any way to unscope (a bit like rails admin for example) the models? It would be a great help.
I've tried using the query building in the column settings where I can query the deleted records but it doesn't apply to the list.

Thanks for the hard work 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions