new method in use

This commit is contained in:
Espen Antonsen 2009-08-11 11:34:40 +02:00
parent 46380d63ad
commit 11f54d27a2
2 changed files with 2 additions and 3 deletions

View file

@ -53,7 +53,7 @@ class PhotosController < ApplicationController
def scan
require "scan"
ScanFiles.FullScan
ScanFiles.Scan(false)
redirect_to(root_path)
end

View file

@ -90,8 +90,7 @@ class Photo < ActiveRecord::Base
self.path = self.album.path + "/" + data.original_filename.parameterize
File.open(APP_CONFIG[:photos_path] + self.path, 'wb') { |f| f.write(data.read) }
end
def create_thumbnails
return if File.exists?(APP_CONFIG[:thumbs_path] + self.album.path + "/" + self.id.to_s + "_collection" + self.extension)
puts "thumb " + self.path_original