nomethodError in type returns class of AR:rel