Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling of scoped dynamic routes #2521

Open
timmyGr opened this issue Feb 15, 2024 · 2 comments
Open

Handling of scoped dynamic routes #2521

timmyGr opened this issue Feb 15, 2024 · 2 comments
Labels
bug breakages in functionality that is implemented namespacing models with a namespace

Comments

@timmyGr
Copy link

timmyGr commented Feb 15, 2024

Right now our current Rails API is a database per tenant model. With our sharding we use middleware based on dynamic scopes in the routing.

It's been a minute since I've worked with Rails and Administrate so forgive me!

We have routes declared as so

  scope ':community' do
    namespace :admin do
      resources :general_settings, only: [:index, :show, :edit]

      root to: 'general_settings#index'
    end
  end

The only solution to get some of the functionality working is customizing views etc...

Is it possible to have Administrate handle the dynamic scopes or is there possibility an existing solution?

@nickcharlton
Copy link
Member

Oh, interesting! I don't think this is something I've ever really used.

I think we'd need to do some work on the resolver to be able to pick up the routes, which if you're needing to do it manually so far hints towards that.

Would you be able to put together an example repository (with just Rails and a similar scoped dynamic routes example) that fits your use case? That'd provide a good starting point to play around and understand what we'd need to do.

@nickcharlton nickcharlton added bug breakages in functionality that is implemented namespacing models with a namespace labels Feb 16, 2024
@timmyGr
Copy link
Author

timmyGr commented Feb 16, 2024

@nickcharlton will do! Give me a few days and I'll post a repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug breakages in functionality that is implemented namespacing models with a namespace
Projects
None yet
Development

No branches or pull requests

2 participants