add attr_accessible for contact_id
add newline to eof
use before_create with self.build_embedded_object