Convert fields to rails