Support association search for other types of association fields (#1398)
Support association search for other types of association fields (#1398)

*This issue and the proposed fix is very similar to https://github.com/thoughtbot/administrate/pull/1176*

Right now association search doesn't work for new types of association fields.

`Administrate::Search` hard-codes the possible types of association fields in a list to determine if association search should be used. This means that new types of fields cannot perform association search and things break.

My proposed solution (see `lib/administrate/search.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.



thoughtbot/administrate,thoughtbot/administrate,thoughtbot/administrate,thoughtbot/administrate