Skip to content

Instantly share code, notes, and snippets.

@dLobatog
Created March 18, 2012 10:11
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 dLobatog/2070328 to your computer and use it in GitHub Desktop.
Save dLobatog/2070328 to your computer and use it in GitHub Desktop.
def img= image
self.has_image = true
AWS::S3.new.buckets[:images_cloudstock].objects[id].write(image.read)
end
def img
AWS::S3.new.buckets[:images_cloudstock].objects[id].url_for(:read) if has_image
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment