Skip to content

Instantly share code, notes, and snippets.

@adriand
Created Aug 20, 2010
Embed
What would you like to do?
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