do not register the comments controller if config.comments == false#5311
Closed
ryanoboril wants to merge 1 commit intoactiveadmin:masterfrom
Closed
do not register the comments controller if config.comments == false#5311ryanoboril wants to merge 1 commit intoactiveadmin:masterfrom
ryanoboril wants to merge 1 commit intoactiveadmin:masterfrom
Conversation
Contributor
Contributor
|
Ideally it would check to verify there are no ActiveAdmin resources that have comments enabled, right? |
|
Comment tables are also left in the database when setting comments to false... |
Member
|
I'm open to a configuration for removing the comments routes and not registering the controller if it's disabled but perhaps best revisited since the existing configuration also controls on what resources it does or doesn't show up. New suggestions can be brought up in #5117. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Setting
config.comments = falseis supposed to completely disable comments functionality, but it doesn't exclude comments from the routes after calling ActiveAdmin.routes(self) and there is no way to remove a registered resource. This PR addresses this issue by preventing the Comments controller from being registered at all if config.comments is set to false.