The syntax has changed quite a bit between the two gems and I use the search functionality in more than 30 controllers / index pages. So I want a simple way to update each instance while still being able to switch back to meta_search if I need to.
So I need to test which of the two gems has been loaded in the running application.
The best way that I have found is this:
if Gem.loaded_specs['ransack'] '... do this...' else '... do that ...' end
You can see the full list of loaded gems with Gem.loaded_specs.keys