administrate icon indicating copy to clipboard operation
administrate copied to clipboard

Added scope support for polymorphic association field

Open DavidGeismarLtd opened this issue 4 years ago • 0 comments

At the moment associated models in a polymorphic association cannot be scoped, by default :all is called in candidate_resources_for(klass). This can produce pretty long lists in the select field.

  • Added option to pass a scope to associated models in Polymorphic::Field
  • Updated the example app to show an example with Customer
  • Was not sure how to writte a test for that, open to suggestions.

First time contributing to open source here, open to any feedback on how to make better contributions 😃 .

DavidGeismarLtd avatar Feb 28 '21 11:02 DavidGeismarLtd