module RuboCop::Cop::ActiveRecordHelper

def polymorphic?(belongs_to)

def polymorphic?(belongs_to)
  options = belongs_to.last_argument
  return false unless options.hash_type?
  options.each_pair.any? do |pair|
    pair.key.sym_type? && pair.key.value == :polymorphic && pair.value.true_type?
  end
end