module Ransack::Adapters::ActiveRecord::Base

def explicitly_defined?(method)

def explicitly_defined?(method)
  definer_ancestor = singleton_class.ancestors.find do |ancestor|
    ancestor.instance_methods(false).include?(method)
  end
  definer_ancestor != Ransack::Adapters::ActiveRecord::Base
end