this is fine. but try to use activerecord association. Don't allow mass assignments on IDs.