Skip to content

Fix duplicate namespace when using config.pundit_policy_namespace#5762

Closed
kwent wants to merge 1 commit intoactiveadmin:masterfrom
kwent:master
Closed

Fix duplicate namespace when using config.pundit_policy_namespace#5762
kwent wants to merge 1 commit intoactiveadmin:masterfrom
kwent:master

Conversation

@kwent
Copy link

@kwent kwent commented May 24, 2019

Hi,

When using config.pundit_policy_namespace = :active_admin when the object namespace is already ActiveAdmin::PagePolicy results of trying to find ActiveAdmin::ActiveAdmin::PagePolicy. Other models inside ActiveAdmin are fine. Only no models policy as Page are impacted.

This PR is fixing that.

@deivid-rodriguez
Copy link
Member

Hi @kwent! Thanks for helping out here. 👍

Can you detail how this issue can be reproduced? I tried on a fresh application and couldn't see the issue, so I think I'm missing some specific setup to make it happen.

Also, if you could add a regression test, that would be great.

@deivid-rodriguez
Copy link
Member

I can reproduce it now, actually, no need for steps :). I'd like a test though.

@kwent
Copy link
Author

kwent commented Jun 14, 2019

Would love to help with a spec but unfortunately i don't have time to set up the environment etc... at the moment. Glad you were able to repro !

@deivid-rodriguez
Copy link
Member

Closing in favor of #5777. Tried to edit this PR but I don't have permission.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants