Displaying 1 result from an estimated 1 matches for "synchronize_photo".
Did you mean:
synchronize_photos
2006 Aug 11
1
Absolute path to public/images in rake task?
...own
folder, and after an update I''d like to be able to synchronize the photo
files with the database (because every photo has its own Photo class
object). I''ve got so far:
# File tasks/photo_gallery.rake:
desc ''Synchronizes the photos of the galleries.''
task :synchronize_photo_galleries => :environment do
puts ''--- Beginning with synchronization ---''
PhotoGallery.synchronize_photos
puts ''--- Synchronization done ---''
end
# File app/models/photo_gallery.rb
class PhotoGallery < ActiveRecord::Base
# associations...
def s...