I am having trouble installing a paperclip gem in one of the applications.
I can not find a handler when I try to save the uploaded file My migration found for error message:
add_attachment: Order, file: Model:
has_attached_file: file validates_attachment_content_type: file ,: content_type = & gt; / Controller:
Draf order_param parameters.Require (: order) .Permit (: file)I get an error:
form_tag url, method :: post, html: {multipart: true} ... = file_field_tag 'order [file]', disabled: when I order my controllerIf you try to execute, accept 'mtd_file': 'image / png, image / gif, image / jpeg'order]
No handler was found for "file.jpg"When I entered
order [file]I see that this is a stringfile.jpg(name of uploaded file)
can you help me? What am i doing wrong
Try the code below, you do not have to pass mulitpart As html hash
`form_tag url, method :: post, multipart: true` <<> form_for You must pass multipart in html hash form_for (@user): HTML = & gt; {: Multipurpose = & gt; True} what? F | For more information, you can refer to below the docs
No comments:
Post a Comment