Answers for "rspec active storage"

0

rspec active storage

def blob_for(name)
  ActiveStorage::Blob.create_after_upload!(
    io: File.open(Rails.root.join(file_fixture(name)), 'rb'),
    filename: name,
    content_type: 'image/jpeg' # Or figure it out from `name` if you have non-JPEGs
  )
end
Posted by: Guest on October-26-2021
0

rspec active storage

post url, params: { signed_id: blob_for('photo.jpg').signed_id }
Posted by: Guest on October-26-2021

Browse Popular Code Answers by Language