Skip to content

Instantly share code, notes, and snippets.

@dipth
Created April 4, 2013 11:31
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 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