Skip to content

Instantly share code, notes, and snippets.

@DanThiffault
DanThiffault / paperclip_model.rb
Created February 15, 2011 13:44
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",
# Filename: RAILS_ROOT/config/initializers/paperclip_thumbnail_with_dimensions.rb
# Required Configuration in the model
#
# include Paperclip::Dimensions
#
# has_attached_file :image,
# :styles => {
# :thumbnail => {
# :geometry => "100x100>",
# :format => :png