Separate scoping for Forest admin models instead of Rails Models

Hi Team,
I am trying to achieve separate scoping for models in Forest admin from my Rails app.
But i happen to see that Forest admin make use of rails admin implicitly.

Expected behavior

My Rails models have default scope.
My forest Admin models should be unscoped or should have separate scope.

Actual behavior

My forest Admin models make use of Rails models and thereby inherit the above mentioned default scopes.

Note: Scope in Forest Admin UI is working on top of the rails models.

  • Project Name: PlutusAdmin

i @ajithmani !
What do you mean by rails scopes ? ForestAdmin doesn’t use RailsAdmin :thinking:
Can you share an example please ?

hi @Nicolas_Sailly, I meant to say rails models not rails admin, My bad. :sweat_smile:
What i am trying to say is, i need to use the models without any pre-defined scopes in rails app.

For example:
in my project,
i have a model called ‘portfolio’ with below default scope (in rails app).

 default_scope -> { where(deleted: false) } 

I need to use this model without this default scope in forest admin.

Hello @ajithmani

Wild guess, but are you using the Paranoia gem in your project?

Hi @Guillaume_Deslandes,
I am not using Paranoia gem.

Hello @ajithmani,

Maybe this thread could help Overriding a Rails default_scope - Stack Overflow

If not, could you try and place a break point here to unsure unscoped is called?

Thank you