After merging https://github.com/thoughtbot/administrate/pull/945, a problem surfaced with plugins that provide new types of association fields, such as https://github.com/pablobm/administrate-field-nested_has_many.
Administrate::BaseDashboard
hard-codes the possible types of association fields in a list that is later used to determined the permitted params. This means that new types of fields cannot make permitted params and things break.
My proposed solution (see lib/administrate/base_dashboard.rb
) does a programmatic search for field classes that inherit from Administrate::Field::Associative
. This allows plugin authors not to worry about adding their new type to a list or any other sort of setup.
A potential problem with this approach is that it includes Administrate::Field::Polymorphic
on the list. I don't know if this can cause problems down the line or not.