module Ransack::Adapters
def self.instantiate_object_mapper
def self.instantiate_object_mapper if defined?(::ActiveRecord::Base) ActiveRecordAdapter.new elsif defined?(::Mongoid) MongoidAdapter.new else raise "Unsupported adapter" end end
def self.object_mapper
def self.object_mapper @object_mapper ||= instantiate_object_mapper end