Delete image through plugin file_column?

how can i delete image through plugin file_column?

If you call destroy to the model that has the file_column the image will
be
deleted.

Horacio

Wednesday 24 May 2006 15:25ã?Ilyas ã?ã??はæ?¸ãã¾ã?ã?:

Horacio S. wrote:

If you call destroy to the model that has the file_column the image will
be
deleted.

Horacio

Wednesday 24 May 2006 15:25ã?Ilyas ã?ã??はæ?¸ãã¾ã?ã?:

but if I have file only in tmp directory, and didn’t yet saved Image
class

I have a profile model with a file_column in there like this:

class Profile < ActiveRecord::Base
belongs_to :user
file_column :image, :magick => { :versions => { “small” =>
“60x70”} }
translates :description
end

When I create a new profile, upload an image and save then it
automaticly
creates a folder like public/profile/id/filename.jpg where id is the
profile
id and filename is the uploaded image file name.

When I call destroy to this profile object the created directory also
disappears completely deleting the image.

If this is not the case for you then something must be wrong, try to
update
the file_column plugin.

regards,
Horacio

Wednesday 24 May 2006 16:12ã?Ilyas ã?ã??はæ?¸ãã¾ã?ã?: