我的参数[附件]:
#<ActionDispatch::Http::UploadedFile:0x007ff89bac0990 @tempfile=#<Tempfile:/tmp/RackMultipart20170119-25970-6hvs90.jpg>, @original_filename="ca.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"job_application[attachments]\"; filename=\"ca.jpg\"\r\nContent-Type: image/jpeg\r\n">
当我创建时:
Attachment.create!( document: params[attachments])
它显示错误:Validation failed: Url This field is required!
任何理想?谢谢你的帮助。
答案 0 :(得分:1)
在EXEC DBMS_UTILITY.compile_schema('SCHEMA_1', compile_all => false);
模型中,您可能会执行某些验证,例如Attachment