ORM agnostic update to #783

ref
https://github.com/gregbell/active_admin/commit/aa10436f207d6a90989c417f
59dfa13d782a76e9#commitcomment-5957693 and #2545
Merge pull request #3062 from seanlinsley/783-update

ORM agnostic update to #783