excid3 / madmin

A robust Admin Interface for Ruby on Rails apps
https://github.com/excid3/madmin
MIT License
576 stars 64 forks source link

fix: Prevents namespace collision with helpers #116

Closed jacobdaddario closed 1 year ago

jacobdaddario commented 3 years ago

Resolves #114

This is a pretty hacky solution, and could probably use some tests to prevent regression. I'm not entirely sure where we'd test that though. For now I've added a helper to HomeController to test things out manually.

I've essentially just ripped some of the code out of isolate_namespace. I'm concerned there might be some side effects, so it's definitely worth a solid look before merging.

jacobdaddario commented 3 years ago

@excid3 Did you ultimately decide to merge isolate_namespace into Master instead? I was working on the bulk delete PR tonight, and I saw isolate_namespace was added to the engine file. It was breaking the dummy app by preventing certain Madmin routes from being available for some reason.

Specifically the app couldn't access madmin_bulk_destroy_path from the index view of Madmin.