I'm having problem with setting up paperclip gem in one of me apps.
I get No handler found for
error message when i try to save uploaded file.
Things that I've done
migration:
add_attachment :orders, :file
model:
has_attached_file :file validates_attachment_content_type :file, :content_type => /\Aimage\/.*\Z/
controller:
def order_params params.require(:order).permit(:file)
view:
form_tag url, method: :post, html: {multipart: true} ... = file_field_tag 'order[file]', disabled: true, id: 'mtd_file',accept: 'image/png,image/gif,image/jpeg'
When I try to execute in my controller Order.create params[order]
I get error
No handler found for "file.jpg"
When I look into order[file]
param I see that it's a string file.jpg
(name of uploaded file).