Skip to content

Instantly share code, notes, and snippets.

@DanThiffault
Created February 15, 2011 13:44
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 DanThiffault/827533 to your computer and use it in GitHub Desktop.
Save DanThiffault/827533 to your computer and use it in GitHub Desktop.
Paperclip section within model
include Paperclip::Dimensions
has_attached_file :image,
:styles => {
:tiny =>{:geometry => "95x110>"},
:small =>{:geometry => "114x132>"},
:normal =>{:geometry => "133x154>"},
:large =>{:geometry => "190x220>"}
},
:path => Settings.user_images.base_path + ":id/:style.:extension",
:url => Settings.user_images.base_url + ":id/:style.:extension"
after_post_process :save_image_dimensions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment