10000 Filters, comments and global AA config · Issue #3695 · activeadmin/activeadmin · GitHub
[go: up one dir, main page]

Skip to content
Filters, comments and global AA config #3695
Closed
@pranas

Description

@pranas

I'd like to propose a change to config behaviour. Currently if you set config.filters = false or config.allow_comments = false in your global AA config, you can no longer use those features:

activeadmin/lib/active_admin/filters/resource_extension.rb:62:in `add_filter': Can't remove a filter when filters are disabled. Enable filters with 'config.filters = true' (ActiveAdmin::Filters::Disabled)

I would like to be able to disable them but still have an option to add filters and comments where I want them.

Default filters became a common problem in our projects: when the data set grows association filters start to consume a lot of memory. I'd like to make config.filters = false a standard practice in my organisation. By default our admin pages wouldn't have any filters, we would add just the ones we want.

The similar situation is with AA comments, I don't want them on every model. I'd better have comments disabled by default but add them where I need to.

I can make a PR if I get a thumbs up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0