I have a resume model that has two associations (documents and wizards). A document is the uploaded resume while a wizard is the output from the user using the resume wizard. These are mutually exclusive models. How can I validate that the user has created a document or a wizard when validating resume?
I am building the association in my resume controller as such.
if params[:document] @document = @resume.build_document(params[:document]) else @wizard = @resume.build_wizard(params[:wizard]) end
Then I either do a resume.save or resume.update_attributes(params[:resume]).