Skip to content

Instantly share code, notes, and snippets.

@georgebrock
Created July 13, 2013 21:02
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 georgebrock/f977c1daa1318ae12892 to your computer and use it in GitHub Desktop.
Save georgebrock/f977c1daa1318ae12892 to your computer and use it in GitHub Desktop.
rails runner 'Tester.delay.create! image_url: "http://georgebrock.com/images/thumbsup.gif"'
rake jobs:workoff
ls -R public/system/testers/images
class Tester < ActiveRecord::Base
has_attached_file :image, styles: { medium: '300x300>', thumb: '100x100>' }
attr_accessible :image_url
def image_url=(url)
self.image = URI.parse(url)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment