OSDN Git Service

t#29079:downcase ext
[pettanr/pettanr.git] / app / models / picture.rb
index e5bbda4..6ebd622 100644 (file)
@@ -93,7 +93,7 @@ class Picture < ActiveRecord::Base
     res = false
     subdirs.each do |d|
       picdata = d.empty? ? mgk.to_blob : self.__send__(d, mgk)
-      res = PictureIO.picture_io.put(picdata, "#{self.id}.#{mgk.format}", d)
+      res = PictureIO.picture_io.put(picdata, self.filename, d)
       break unless res
     end
     res