From b93032e2262fdeb16e0f06018eb34460d8837480 Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Wed, 14 Mar 2012 00:53:37 +0600 Subject: [PATCH] [refs #265] fixed avatar sizes --- app/models/user.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index cb16c94c3..5b269ba30 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -6,10 +6,10 @@ class User < ActiveRecord::Base MAX_AVATAR_SIZE = 5.megabyte has_attached_file :avatar, :styles => - { :micro => { :geometry => "16x16", :format => :jpg, :convert_options => '-strip -background white -flatten -quality 70'}, - :small => { :geometry => "30x30>", :format => :jpg, :convert_options => '-strip -background white -flatten -quality 70'}, - :medium => { :geometry => "40x40>", :format => :jpg, :convert_options => '-strip -background white -flatten -quality 70'}, - :big => { :geometry => "81x81>", :format => :jpg, :convert_options => '-strip -background white -flatten -quality 70'} + { :micro => { :geometry => "16x16#", :format => :jpg, :convert_options => '-strip -background white -flatten -quality 70'}, + :small => { :geometry => "30x30#", :format => :jpg, :convert_options => '-strip -background white -flatten -quality 70'}, + :medium => { :geometry => "40x40#", :format => :jpg, :convert_options => '-strip -background white -flatten -quality 70'}, + :big => { :geometry => "81x81#", :format => :jpg, :convert_options => '-strip -background white -flatten -quality 70'} } validates_inclusion_of :avatar_file_size, :in => (0..MAX_AVATAR_SIZE), :allow_nil => true