-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Bug: comment routes appear even when comments are disabled #5117
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
Comments
looks like this can be handled here |
Perhaps registering the Comment resource should be avoided altogether for namespaces that disable it?
|
I have the same issue. I'm a bit confused on how you were able to solve it. Thank you |
@vanegomez I ended up doing a workaround: created an empty custom resource page for ActiveAdmin::Comment. The routes are still there, but the page is blank.
I traced back to where this was introduced and tried to understand the rationale, I don't think the fix as I proposed above is going to be effective. I tried to re-ignite the conversation here: Hope this helps! |
Found a workaround that prevents the
Consider before using:
|
Uh oh!
There was an error while loading. Please reload this page.
Expected behavior
When disabling comments through
config.comments = false
, the comments-related routes should not be registered.Actual behavior
Comments-related routes (e.g.
/admin/comments
) appear in routes even if comments are disabled in configuration.How to reproduce
config.comments = false
toconfig/initializers/active_admin.rb
ActiveAdmin.routes(self)
toconfig/routes.rb
rake routes | grep comments
Comment-related routes appear.
(cc @alainbloch)
The text was updated successfully, but these errors were encountered: