I’m currently working with nested forms/fields_for and I was wondering if there was an easy way to skip validations for nested attributes?
Can I maybe squeeze a object.nested_object.save(:validate => false) in somewhere?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You just need do your save in two part. The first save about the parent saving and second part about nested
If you use an
accepts_nested_attributes_foron this nested fieldUpdate with comment from Cojones :
If you don’t use this option you need assign directly the nested_attribute like explain on comment :
Please see comment for more information.