Forum: Ruby on Rails delete image through plugin file_column ?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Faa86d6ab4a5d5d80cfb11197941e70d?d=identicon&s=25 Ilyas (Guest)
on 2006-05-24 08:25
how can i delete image through plugin file_column?
81cf8dab4b4af8aa3148c28421afd845?d=identicon&s=25 Horacio Sanson (Guest)
on 2006-05-24 08:56
(Received via mailing list)
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 ã?ã??はæ?¸ãã¾ã?ã?:
Faa86d6ab4a5d5d80cfb11197941e70d?d=identicon&s=25 Ilyas (Guest)
on 2006-05-24 09:12
Horacio Sanson 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
81cf8dab4b4af8aa3148c28421afd845?d=identicon&s=25 Horacio Sanson (Guest)
on 2006-05-24 12:06
(Received via mailing list)
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 ã?ã??はæ?¸ãã¾ã?ã?:
This topic is locked and can not be replied to.