This commit is contained in:
r888888888
2013-07-11 15:50:51 -07:00
parent bedf1af579
commit c520c7f03c
28 changed files with 31 additions and 2796 deletions

View File

@@ -53,9 +53,9 @@ class Advertisement < ActiveRecord::Base
File.chmod(0644, image_path)
File.open(image_path, "rb") do |file|
image_size = ImageSize.new(file.read)
self.width = image_size.get_width
self.height = image_size.get_height
image_size = ImageSpec.new(file)
self.width = image_size.width
self.height = image_size.height
end
if width > height