Skip to content

Instantly share code, notes, and snippets.

@dwilkins
Created July 11, 2017 20:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dwilkins/8ee73425f3c10c46f74c18cf9069594b to your computer and use it in GitHub Desktop.
Save dwilkins/8ee73425f3c10c46f74c18cf9069594b to your computer and use it in GitHub Desktop.
Users fixtures
<% binary_image = File.open("#{Rails.root}/test/fixtures/files/photo-one.png").read %>
<% image_uid = Dragonfly.app.store(binary_image) %>
<% image_name = Dragonfly.app.fetch(image_uid).name %>
john_doe:
username: jdoe
email: 'jdoe@exampmle.com'
first_name: John
last_name: Doe
photo_uid: image_uid
photo_name: image_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment