[refs #265] fixed avatar sizes
This commit is contained in:
parent
ba437f7703
commit
b93032e226
|
@ -6,10 +6,10 @@ class User < ActiveRecord::Base
|
||||||
MAX_AVATAR_SIZE = 5.megabyte
|
MAX_AVATAR_SIZE = 5.megabyte
|
||||||
|
|
||||||
has_attached_file :avatar, :styles =>
|
has_attached_file :avatar, :styles =>
|
||||||
{ :micro => { :geometry => "16x16", :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'},
|
: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'},
|
: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'}
|
: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
|
validates_inclusion_of :avatar_file_size, :in => (0..MAX_AVATAR_SIZE), :allow_nil => true
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue