Skip to content

Instantly share code, notes, and snippets.

@monorkin
Created January 2, 2019 17:49
Show Gist options
  • Save monorkin/a50c2f6c8f62cd8c49bef355467b1639 to your computer and use it in GitHub Desktop.
Save monorkin/a50c2f6c8f62cd8c49bef355467b1639 to your computer and use it in GitHub Desktop.
gallery = Gallery.find(arguemnts[:gallery_id])
arguments[:images].map do |file|
# Image has a Shrine uploader attached to `file_data`
Image.create(file: file, gallery: gallery)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment