Seeing https://github.com/thoughtbot/administrate/issues/2063 made me think about quick ways to customise Administrate's search.
I realised that Administrate::ApplicationController#index
doesn't make it easy to override the way that search is performed, so this seems like a first "obvious" port of entry.
By factoring out lines 8-10 into their own method, now we can do things like shown in the provided spec. This should be enough for everyone to adapt the search to their own use case.
In the future, we can try rework Administrate::Order
into something more configurable and "better". However we all know this is long term future, so this PR should get us going, for a long way, until then.