Example code to use Paperclip gem for uploading images. Includes code for AJAX-style uploads