flexible activerecord model class lookup