Skip to content

Instantly share code, notes, and snippets.

@dipth
Created April 4, 2013 11:31
Show Gist options
  • Save dipth/5309658 to your computer and use it in GitHub Desktop.
Save dipth/5309658 to your computer and use it in GitHub Desktop.
deal = Deal.find(42)
File.open('my_file.jpg') do |file|
deal.images.create :image => file
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment