lib/attachment_magick.rb in attachment_magick-0.2.1 vs lib/attachment_magick.rb in attachment_magick-0.2.2
- old
+ new
@@ -52,10 +52,11 @@
AttachmentMagick.configuration.custom_styles.styles.each do |key, value|
option = value
if value.is_a?(String)
width, height = value.split("x")
option = {:width => width.to_i}
- option.merge!({:height => height.to_i}) if height
+ option.merge!({:height => height.to_i}) if height
+ option.merge!({:ajust => height.match(/\W/).to_s}) unless height.match(/\W/).to_s.blank? if height
end
hash.merge!({key.to_sym => option})
end
end
\ No newline at end of file