activerecord polymorphic relation fix