class Ransack::Adapters::ActiveRecord::Context

def get_association(str, parent = @base)

def get_association(str, parent = @base)
  klass = klassify parent
  ransackable_association?(str, klass) &&
  klass.reflect_on_all_associations.detect { |a| a.name.to_s == str }
end