Skip to content

Instantly share code, notes, and snippets.

@adriand
Created August 20, 2010 17:21
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 adriand/540758 to your computer and use it in GitHub Desktop.
Save adriand/540758 to your computer and use it in GitHub Desktop.
has_attached_file :video,
:url => ":class/:id/:style/:basename.:extension",
:path => ":class/:id/:style/:basename.:extension",
:storage => :s3 # this is redundant if you are using S3 for all your storage requirements
validates_attachment_presence :video
has_attached_file :thumbnail, :styles => {:thumb => "162x161#"} # adjust the thumb style as needed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment