Flowdock
method

attach

Importance_1
v5.2.3 - Show latest stable - 0 notes - Class: Many
attach(*attachables) public

Associates one or several attachments with the current record, saving them to the database.

document.images.attach(params[:images]) # Array of ActionDispatch::Http::UploadedFile objects
document.images.attach(params[:signed_blob_id]) # Signed reference to blob from direct upload
document.images.attach(io: File.open("/path/to/racecar.jpg"), filename: "racecar.jpg", content_type: "image/jpg")
document.images.attach([ first_blob, second_blob ])
Show source
Register or log in to add new notes.