Skip to content

Instantly share code, notes, and snippets.

@dux
Created March 21, 2012 14:43
Show Gist options
  • Save dux/2147691 to your computer and use it in GitHub Desktop.
Save dux/2147691 to your computer and use it in GitHub Desktop.
Paperclip - resize default image if image provided for asset manager
:styles => lambda { |i| i.instance.file_content_type =~ /image/ ? { :original => "800x600>" } : {} }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment