Forum: Ruby on Rails Optional Image Upload

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.
(Guest)
on 2007-06-24 04:08
(Received via mailing list)
Attachment_fu is making an assumption that image will always be
uploaded. This is causing problem in my application where the field is
optional. Does anyone know how to make the image upload optional
without blowing up the app?

Is there any other plugin that does not make such an assumption? TIA.
Chris K. (Guest)
on 2007-06-24 04:25
removed_email_address@domain.invalid wrote:
> Attachment_fu is making an assumption that image will always be
> uploaded. This is causing problem in my application where the field is
> optional. Does anyone know how to make the image upload optional
> without blowing up the app?
>
> Is there any other plugin that does not make such an assumption? TIA.

I haven't tried attachment_fu, but the file_column plugin lets you
specify (or omit) validates_presence_of just like you would with any
other attribute.

Chris K.
This topic is locked and can not be replied to.